Forum: Ruby Rake doesn't recognise that rubyzip gem is installed

Posted by Max Williams (max-williams)
on 2010-03-08 16:04
Hi all.  First of all apologies for a rails-ish post but i think this is
a more general ruby gems problem.

I'm trying to freeze the rubyzip gem into an app with rake, and get an
error that it isn't installed.  But it is installed:

> gem list | grep zip
rubyzip (0.9.1)

I have this line in my config:
  config.gem "rubyzip", :version => '0.9.1'

And now i try to do
rake gems:install

It bombs out with a big stack trace, which is included at the bottom of
this post for reference, with final part being:

Missing these required gems:
  rubyzip  = 0.9.1

You're running:
  ruby 1.8.6.111 at /usr/bin/ruby1.8
  rubygems 1.3.5 at /home/max/.gem/ruby/1.8, /var/lib/gems/1.8

Run `rake gems:install` to install the missing gems.

Which is telling me to do what i just tried to do.

Any ideas anyone?  I have the exact same problem with the
memcache-client gem as well.

grateful for any advice - max
Posted by Max Williams (max-williams)
on 2010-03-08 16:09
Solved the problem - google revealed that i need to add :lib => 
"zip/zip" to my config.gem call, ie

  config.gem "rubyzip", :version => '0.9.1', :lib => "zip/zip"

Then i was able to freeze it into the app with
rake gems:unpack

Thanks for reading - if anyone wants to explain the logic of this to me 
i'd be happy to know - it seems like a random obstacle to me.
max
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.