Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

(Debian squeeze) rvm version: 1.10.0

I have just installed ruby 1.9.2-p290 using "rvm install 1.9.2" and made it default. However, I am getting this error when trying to install rails using rubygems. "gem install rails" worked fine on my system ruby installation.

root:/usr/bin# rvm list

rvm rubies

=> ruby-1.9.2-p290 [ i686 ]

root:/usr/bin# rvm current ruby-1.9.2-p290 root:/usr/bin# gem list

* LOCAL GEMS *

root:/usr/bin# gem install rails ERROR: Loading command: install (LoadError) no such file to load -- zlib

ERROR: While executing gem ... (NameError) uninitialized constant Gem::Commands::InstallCommand

I have tried the instructions on this other page: http://stackoverflow.com/questions/2441248/rvm-ruby-1-9-1-troubles, (apt-get install zlib, reinstalling 1.9.2 on rvm), but that didn't seem to work. Any ideas of what might be the root problem?

share|improve this question
add comment

1 Answer

You need to install the dev package for zlib before installing ruby with rvm. Assuming you are using Debian or Ubuntu,

apt-get install zlib1g-dev
rvm remove 1.9.2
rvm install 1.9.2

should do it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.