Rubyzip gem installed but not recognised

Hi,

I have installed rubyzip successfully(see output below)
Successfully installed rubyzip-0.9.1
1 gem installed
Installing ri documentation for rubyzip-0.9.1…
Installing RDoc documentation for rubyzip-0.9.1…

if I put config.gem ‘rubyzip’ in environment.rb and then run rails it
fails to load rubyzip … see below
george@geolaptop:~/Dropbox/git/paua$ ruby script/server
=> Booting WEBrick…
no such file to load – rubyzip-0.9.1
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
dependencies.rb:153:in require' /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/ dependencies.rb:521:innew_constants_in’
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
dependencies.rb:153:in `require’

Also if I try to put the gem into vendor it doesnt complain but it
does nothing :
george@geolaptop:~/Dropbox/git/paua$ rake gems:unpack GEM=rubyzip
(in /home/george/Dropbox/git/paua)
george@geolaptop:~/Dropbox/git/paua$

My rake tasks which use rubyzip via a “require ‘zip/zipfilesystem’”
work fine. I just cant do a config.gem or freeze it into vendor.

Any suggestions welcome. Gems seem like such a good idea but cause so
much grief!

Cheers
George

try to add `require “zip/zipfilesystem”’ in the ruby file that
requires the rubyzip gem

2010/1/19 giorgio [email protected]:

On Jan 20, 4:21Â am, Kristian H. [email protected]
wrote:

try to add `require “zip/zipfilesystem”’ in the ruby file that
requires the rubyzip gem

I have already done that and it works.
However I cant do ‘config.gem’ without causing errors and I cant
install the gem in vendor.

I have a rake task that happens to use rubyzip and everything is fine
on my system with rubyzip in the ruby gems folder, but when I try to
run ANY rake task on Heroku where I have a copy of the app it fails
because it cant find the gem.

Why cant I install it in vendor? Can I just copy it there?

Cheers
George

What’s exact config.gem statement you’re using within your environment.rb?

config.gem ‘rubyzip’

I did try various ‘lib’ options as well but to no avail.

G.

On Tue, Jan 19, 2010 at 10:46 AM, giorgio [email protected]
wrote:

What’s exact config.gem statement you’re using within your
environment.rb?

I have a rake task that happens to use rubyzip and everything is fine
on my system with rubyzip in the ruby gems folder, but when I try to
run ANY rake task on Heroku where I have a copy of the app it fails
because it cant find the gem.

You might want to file a ticket with Heroku if this is truly an issue
with
them. Also, you might want to try using the bundler gem which can be
installed using:

sudo gem install bundler

Next, the documentation can be found here:

Good luck,

-Conrad

On Jan 19, 3:22Â pm, giorgio [email protected] wrote:

What’s exact config.gem statement you’re using within your environment.rb?

config.gem ‘rubyzip’

I did try various ‘lib’ options as well but to no avail.

G.

:lib => ‘zip/zip’ should work, based on the layout of files in the
gem.

–Matt J.