unable to install rails using rvm

Hi ,
I m unable to install rails by using rvm(ruby version manager ).
Error im getting :
gem install rails
ERROR: Loading command: install (LoadError)
no such file to load – zlib

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

My cuurent ruby version : 1.9.2
gem version : 1.8.0

Thanks,
Sai

Googling for
rvm no such file to load zlib
finds links that will probably help.

Colin

I got the same problem, i think it's something with rubygems that is
not compiled correctly but so far i can't find the fix.

Just now i got soultion.

First remove ruby installed versions .

And try to run these commands :

sudo apt-get install build-essential bison openssl libreadline5 libreadline-dev curl git-core zlib1g zlib1g-dev libssl-dev vim libsqlite3-0 libsqlite3-dev sqlite3 libreadline-dev libxml2-dev git-core subversion autoconf

sudo bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )

rvm -v

rvm ls

gem update

Wow I never heard that errors before. i think the easy way to resolve that is remove your old gem, or check your rvm n ruby installed correctly or not?
that’s was my last option when i found errors n cannot resolve it.