I have rubyzip 0.9.9 and am creating a zip file like so:
Zip::ZipFile.open(zip_path, Zip::ZipFile::CREATE) do |zipfile|
#code goes here
end
When I give it a zip path like this: zip_path = File.join(Rails.root, "/tmp/zips/#{
zip.id}.zip") , it works fine locally, but not on heroku. On heroku I get an error like:
failed with Errno::ENOENT: No such file or directory - /tmp/zips/31.zip20140115-1059-1j1bx6
I looks like it's appending a timestamp onto the filepath for some reason. I switched to using zip_path = File.expand_path('/tmp/zips/#{zip.id}.zip"), and I get that same "No such file or directory" error on localhost also.
What's going on here? Something with the RubyZip gem?