Create zip archive of a folder with ruby
require 'zip'
require 'zip/filesystem'
Zip::File.open(zip_path, Zip::File::CREATE) do |zipfile|
Dir[File.join(directory_to_be_zipped, '*')].each do |file|
zipfile.add(File.basename(file), file)
end
end