3

I am currently using ubuntu 11.10. I just now installed rvm and ruby 1.9.2. When I try to install rails I get the following error

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

I tried installing zlib library in many ways but I still get this error and couldn't proceed further.

Rahul
  • 44,892
  • 25
  • 73
  • 103

1 Answers1

5

Do the following:

 1. install zlib devel (sudo apt-get install zlib1g-dev )
 2. cd /path_to_your_ruby_install_directory
 3. cd ext/zlib/
 4. ruby extconf.rb
 5. make
 6. make install

After that try to install rails again

After a little research I found this link that I consider to be more useful for your case.

Community
  • 1
  • 1
cristian
  • 8,676
  • 3
  • 38
  • 44