rails 3 - LoadError (cannot load such file -- zip/zip)

ggrillone picture ggrillone · Aug 22, 2012 · Viewed 14.9k times · Source

I'm using rubyzip to zip a csv file so uses can download it. This works perfectly in development mode. But when I tried zipping the file on the production server (rackspace) I received the error: LoadError (cannot load such file -- zip/zip). Is it a path issue? Anyone know a fix?

The error is being called in my code on this line: require 'zip/zip'

I've tried the solution from here, but it didn't help.

Answer

eagor picture eagor · Sep 5, 2013

I fixed this problem by specifying gem version 0.9.9 in Gemfile:

gem 'rubyzip',  "~> 0.9.9"

Using rubyzip (1.0.0) caused an error.