# Problem in ruby1.9 gems

**URL:** <https://www.ruby-forum.com/t/problem-in-ruby1-9-gems/174799>\
**Category:** Ruby\
**Created:** [September 2, 2009, 1:25pm UTC](https://www.ruby-forum.com/t/problem-in-ruby1-9-gems/174799 "2009-09-02T13:25:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhishek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@abhishek](https://www.ruby-forum.com/u/abhishek)\
**Post date:** [September 2, 2009, 1:25pm UTC](https://www.ruby-forum.com/t/problem-in-ruby1-9-gems/174799/1 "2009-09-02T13:25:25Z")

</div>

hi i have installed ruby 1.9.1 side by side with previously installed  
ruby 1.8.7  
i have created symlink to ruby1.9 also.  
now when i say ‘gem1.8 list’, it shows the list of gems installed for  
ruby 1.8

i’ve not installed any gems for ruby 1.9.1 yet.  
problem is when i try to get list of gems for ruby1.9.like:  
$ gem1.9 list

following error comes :

/usr/lib/ruby1.9/1.9.1/rubygems/spec\_fetcher.rb:1:in `require': no such file to load -- zlib (LoadError) from /usr/lib/ruby1.9/1.9.1/rubygems/spec_fetcher.rb:1:in`\<top  
(required)\>’  
from /usr/lib/ruby1.9/1.9.1/rubygems/commands/query\_command.rb:3:in  
`require' from /usr/lib/ruby1.9/1.9.1/rubygems/commands/query_command.rb:3:in`\<top (required)\>’  
from /usr/lib/ruby1.9/1.9.1/rubygems/commands/list\_command.rb:2:in  
`require' from /usr/lib/ruby1.9/1.9.1/rubygems/commands/list_command.rb:2:in`\<top  
(required)\>’  
from /usr/lib/ruby1.9/1.9.1/rubygems/command\_manager.rb:140:in `require' from /usr/lib/ruby1.9/1.9.1/rubygems/command_manager.rb:140:in`rescue  
in load\_and\_instantiate’  
from /usr/lib/ruby1.9/1.9.1/rubygems/command\_manager.rb:132:in  
`load_and_instantiate' from /usr/lib/ruby1.9/1.9.1/rubygems/command_manager.rb:65:in`[]’  
from /usr/lib/ruby1.9/1.9.1/rubygems/command\_manager.rb:118:in  
`find_command' from /usr/lib/ruby1.9/1.9.1/rubygems/command_manager.rb:104:in`process\_args’  
from /usr/lib/ruby1.9/1.9.1/rubygems/command\_manager.rb:75:in `run' from /usr/lib/ruby1.9/1.9.1/rubygems/gem_runner.rb:39:in`run’  
from /usr/bin/gem1.9:24:in `’

and when i tried to install gems for ruby1.9:  
$ sudo gem1.9 install activesupport

following error comes:

/usr/lib/ruby1.9/1.9.1/rubygems/package.rb:10:in `require': no such file to load -- zlib (LoadError) from /usr/lib/ruby1.9/1.9.1/rubygems/package.rb:10:in`\<top (required)\>’  
from /usr/lib/ruby1.9/1.9.1/rubygems/format.rb:9:in `require' from /usr/lib/ruby1.9/1.9.1/rubygems/format.rb:9:in`\<top (required)\>’  
from /usr/lib/ruby1.9/1.9.1/rubygems/installer.rb:11:in `require' from /usr/lib/ruby1.9/1.9.1/rubygems/installer.rb:11:in`\<top  
(required)\>’  
from /usr/lib/ruby1.9/1.9.1/rubygems/dependency\_installer.rb:3:in  
`require' from /usr/lib/ruby1.9/1.9.1/rubygems/dependency_installer.rb:3:in`\<top  
(required)\>’  
from /usr/lib/ruby1.9/1.9.1/rubygems/commands/install\_command.rb:4:in  
`require' from /usr/lib/ruby1.9/1.9.1/rubygems/commands/install_command.rb:4:in`\<top (required)\>’  
from /usr/lib/ruby1.9/1.9.1/rubygems/command\_manager.rb:140:in `require' from /usr/lib/ruby1.9/1.9.1/rubygems/command_manager.rb:140:in`rescue  
in load\_and\_instantiate’  
from /usr/lib/ruby1.9/1.9.1/rubygems/command\_manager.rb:132:in  
`load_and_instantiate' from /usr/lib/ruby1.9/1.9.1/rubygems/command_manager.rb:65:in`[]’  
from /usr/lib/ruby1.9/1.9.1/rubygems/command\_manager.rb:118:in  
`find_command' from /usr/lib/ruby1.9/1.9.1/rubygems/command_manager.rb:104:in`process\_args’  
from /usr/lib/ruby1.9/1.9.1/rubygems/command\_manager.rb:75:in `run' from /usr/lib/ruby1.9/1.9.1/rubygems/gem_runner.rb:39:in`run’  
from /usr/bin/gem1.9:24:in `’

how i can install gems for ruby1.9 ???

---

<div class="post-metadata">

**Author:** ![abhishek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@abhishek](https://www.ruby-forum.com/u/abhishek)\
**Post date:** [September 2, 2009, 2:39pm UTC](https://www.ruby-forum.com/t/problem-in-ruby1-9-gems/174799/2 "2009-09-02T14:39:11Z")

</div>

Dear Abhishek,

> /usr/lib/ruby1.9/1.9.1/rubygems/spec\_fetcher.rb:1:in `require’: no such  
> file to load – zlib (LoadError)

your system has a problem finding zlib …  
there have been quite a number of threads investigating this problem  
with  
various versions of Ruby on this list.  
What OS are you using and how did you install Ruby 1.9 ?

Best regards,

Axel

---

<div class="post-metadata">

**Author:** ![abhishek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@abhishek](https://www.ruby-forum.com/u/abhishek)\
**Post date:** [September 2, 2009, 3:01pm UTC](https://www.ruby-forum.com/t/problem-in-ruby1-9-gems/174799/3 "2009-09-02T15:01:44Z")

</div>

Axel E. wrote:

> Dear Abhishek,
> 
> > /usr/lib/ruby1.9/1.9.1/rubygems/spec\_fetcher.rb:1:in `require’: no such  
> > file to load – zlib (LoadError)
> 
> your system has a problem finding zlib …  
> there have been quite a number of threads investigating this problem  
> with  
> various versions of Ruby on this list.  
> What OS are you using and how did you install Ruby 1.9 ?

i’m using ubuntu 9.04  
i’ve followed following steps to install ruby 1.9.1

1. i,ve downloaded ruby 1.9.1-p243 from  
“[Download Ruby](http://www.ruby-lang.org/en/downloads/)”
2. extract that .tar.gz
3. run ‘./configure --prefix=/usr --program-suffix=1.9’
4. run ‘sudo make && sudo make install’
5. create symlink ‘ruby’ to ‘ruby1.9’

-Abhishek

---

<div class="post-metadata">

**Author:** ![abhishek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7ba0ec/32.png) [@abhishek](https://www.ruby-forum.com/u/abhishek)\
**Post date:** [September 2, 2009, 3:12pm UTC](https://www.ruby-forum.com/t/problem-in-ruby1-9-gems/174799/4 "2009-09-02T15:12:34Z")

</div>

> i’m using ubuntu 9.04  
> i’ve followed following steps to install ruby 1.9.1
> 
> 1. i,ve downloaded ruby 1.9.1-p243 from  
> “[Download Ruby](http://www.ruby-lang.org/en/downloads/)”
> 2. extract that .tar.gz
> 3. run ‘./configure --prefix=/usr --program-suffix=1.9’
> 4. run ‘sudo make && sudo make install’
> 5. create symlink ‘ruby’ to ‘ruby1.9’

Try this :

[http://forum.webbynode.com/topic.php?id=56](http://forum.webbynode.com/topic.php?id=56)

Best regards,

Axel
