Forum: Ruby copy binary files to dir and zip

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
47abae4058d56eff6ef08d69e5f899f2?d=identicon&s=25 Chas Conquest (chasconquest)
on 2007-05-13 21:52
'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 topic is locked and can not be replied to.