cannot load such file — zlib – Ruby RVM or Gem commands

ami@os ~ $ gem install
ERROR:  Loading command: install (LoadError)
cannot load such file — zlib
ERROR:  While executing gem … (NameError)
uninitialized constant Gem::Commands::InstallCommand

You haven’t check the ‘rvm requirements’.

sudo apt-get -y install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion

Please make sure that you installed all files and then type in this command

 

rvm reinstall 1.9.3

 

This should do the trick. Once reinstalled you should be able to run

gem install rails

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s