Copy binary files to dir and zip

‘src’ dir contains 2 binary files (mp3s)

I want to copy the files from ‘src’ into a new dir and then zip it.

The copy into a new dir is fine, but

I can’t seem to get the new dir in to the zip.

Any clues?


require ‘rubygems’
require ‘zip/zipfilesystem’
require ‘FileUtils’

stuff = FileUtils.cp_r ‘src/.’, ‘order’ #this copies the files
fine…‘’, Zip::ZipFile::CREATE) do |zip|‘’, ‘w’) { |f1| f1 << ‘order’}

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs