tags:

views:

607

answers:

2

I've decided to start fresh with ubuntu 10.10. I started with installing git and then installing rvm from the git repo. everything worked fine and I compiled and install ruby 1.8.7 and ruby 1.9.2
the gem is also installed and I run gem -v
but when run gem list or gem install rake I get the following error

ERROR:  Loading command: list (LoadError)
no such file to load -- zlib
ERROR:  While executing gem ... (NameError)
uninitialized constant Gem::Commands::ListCommand

any idea how to solve this issue? I also tried sudo apt-get install zlib1g zlib1g-dev build-essential libpq-dev with no luck

+2  A: 

Try the following in your Ruby source after installing zlib1g-dev:

cd ext/zlib
ruby extconf.rb
make
sudo make install

Also see: http://rbjl.net/19-rubybuntu-1-installing-ruby-and-rails-on-ubuntu

J-_-L
+2  A: 

Or if using rvm, just re-install the ruby version once you have zlib1g-dev installed.

Chris Kimpton