Rake doesn't recognise that rubyzip gem is installed

M

Max Williams

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
 
M

Max Williams

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top