Problem in ruby1.9 gems

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:inrescue
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:inprocess_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:inrun’
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:inrescue
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:inprocess_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:inrun’
from /usr/bin/gem1.9:24:in `’

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

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

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
  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

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
  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

Best regards,

Axel