[Rails] RubyZip zip file creation works on localhost but not heroku
I'm pretty sure you can't save files on heroku. You would need to save it to something like AWS. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/30a339cb-bb02-40d0-b0b5-452e4c2a5ac1%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] RubyZip zip file creation works on localhost but not heroku
On Fri, Jan 17, 2014 at 8:23 AM, Curtis Ovard ovar...@gmail.com wrote: I'm pretty sure you can't save files on heroku. You would need to save it to something like AWS. If it's for a user you could just offload it onto them too by using something like jszip and doing it in browser. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAM5XQnyZO8_EPUR-w9Z5DEnJyfPG%2BQzMQVUhLhPFwPrh9JwhpQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] RubyZip zip file creation works on localhost but not heroku
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? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b6b3e2cd-44c0-4988-80ee-30af69213007%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.