Forum: Ruby ERROR: Loading command: install (LoadError)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
mapreferee r. (Guest)
on 2011-12-25 12:16
Hi all,

I have encountered a problem when learning Ruby. I am trying to install
several gems on ubtuntu. I install them with the following command:

gem install the_name_of_a_gem

But then I got the error message below:
---------------------------------------
ERROR:  Loading command: install (LoadError)
    cannot load such file -- zlib
ERROR:  While executing gem ... (NameError)
    uninitialized constant Gem::Commands::InstallCommand
-----------------------------------------

Have I done something wrong here. Any help appreciated.
Peter Z. (Guest)
on 2011-12-25 12:21
(Received via mailing list)
mapreferee ruby писал 25.12.2011 14:16:
> ERROR:  Loading command: install (LoadError)
>     cannot load such file -- zlib
> ERROR:  While executing gem ... (NameError)
>     uninitialized constant Gem::Commands::InstallCommand
> -----------------------------------------
>
> Have I done something wrong here. Any help appreciated.

Looks like you are using RVM. If so, then install zlib1g-dev
and libssl-dev, then reinstall whatever Ruby version you are using.
mapreferee r. (Guest)
on 2011-12-25 18:51
Thanks for the reply! It works like a charm now. =]
This topic is locked and can not be replied to.