Gem does not know how to install?

luis.fernando.flores.oviedo's Avatar


28 Jul, 2011 03:21 PM

Hello, I need your help please. I had a successful installation message but anything I try to install with gems I get this message:
luisflores@HAL-D510:~/Downloads/rubygems-1.8.6/bin$ sudo 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 tried to reinstall gems several times but always get this message.
Thank you for your time.

  1. 1 Posted by Luis Lavena on 28 Jul, 2011 03:26 PM

    Luis Lavena's Avatar

    RubyGems requires zlib to work.

    Dunno how you build your installation, but please ensure first zlib development headers are installed and build Ruby again.

  2. 2 Posted by luis.fernando.f... on 28 Jul, 2011 05:24 PM

    luis.fernando.flores.oviedo's Avatar

    Hello Luis, Gems is working now, I had Ruby 1.9.1 trying to work with the
    latest Gem distribution, I did build Ruby with 1.9.2 distribution as you
    suggested and it worked. I guess there was a conflict between the releases.
    Thanks again for your time.

    2011/7/28 Luis Lavena <
    [email blocked]>

  3. Luis Lavena closed this discussion on 28 Jul, 2011 05:25 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac