problem with ruby1.9.2 and gems on Debian

Discussion in 'Ruby' started by Jen, Oct 24, 2010.

  1. Jen

    Jen Guest

    Hi,
    I installed rubygems 1.3.7, then decided to upgrade from ruby1.8 to
    ruby1.9.2.

    I forgot to uninstall rubygems before installing ruby1.9.2, as I didn't
    realise gems came with it.

    Now I want to install some gems, but when I run 'gem 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

    Can I repare 'gems? If not should I remove ruby1.9.2, rubygems1.3.7 and
    start again?

    It may be worth mentioning that I built these packages on Debian Lenny
    from source, and they are not in the database used by 'apt' etc.

    I have tried removing all traces of Ruby and rubygems from the system,
    then rebuilding and installing ruby1.9.2

    Thanks,
    Jen.
     
    Jen, Oct 24, 2010
    #1
    1. Advertising

  2. On 10-10-24 04:17 PM, Jen wrote:
    > Hi,
    > I installed rubygems 1.3.7, then decided to upgrade from ruby1.8 to
    > ruby1.9.2.
    >
    > I forgot to uninstall rubygems before installing ruby1.9.2, as I didn't
    > realise gems came with it.
    >
    > Now I want to install some gems, but when I run 'gem 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
    >
    > Can I repare 'gems? If not should I remove ruby1.9.2, rubygems1.3.7 and
    > start again?
    >
    > It may be worth mentioning that I built these packages on Debian Lenny
    > from source, and they are not in the database used by 'apt' etc.
    >
    > I have tried removing all traces of Ruby and rubygems from the system,
    > then rebuilding and installing ruby1.9.2
    >
    > Thanks,
    > Jen.
    >
    >

    possibly you just need to do the following to add the missing zlib
    header files:

    sudo aptitude install zlib1g-dev

    you might also want to add these header files(if you have not already)

    sudo aptitude install libc6-dev libssl-dev
    sudo aptitude install libreadline6-dev zlib1g-dev libsqlite3-dev

    once you have a working ruby install rails and sqlite3

    sudo gem install rails
    sudo gem install sqlite3-ruby

    --
    Kind Regards,
    Rajinder Yadav | DevMentor.org | Do Good! ~ Share Freely

    GNU/Linux: 2.6.35-22-generic
    Kubuntu x86_64 10.10 | KDE 4.5.1
    Ruby 1.9.2p0 | Rails 3.0.1
     
    Rajinder Yadav, Oct 25, 2010
    #2
    1. Advertising

  3. Jen

    Jen Guest

    Hi,

    Managed to gget gems working. I had a bit of a problem with aptitude not
    removing everything I expected it to, so after a bit of playing I got it
    working with ruby-1.9.2.

    Now I've got some other issues with my rails app, but I'll post to a
    more specific rails forum.

    Thanks,
    Jen.


    On 25/10/10 08:35, Rajinder Yadav wrote:
    > On 10-10-24 04:17 PM, Jen wrote:
    >> Hi,
    >> I installed rubygems 1.3.7, then decided to upgrade from ruby1.8 to
    >> ruby1.9.2.
    >>
    >> I forgot to uninstall rubygems before installing ruby1.9.2, as I didn't
    >> realise gems came with it.
    >>
    >> Now I want to install some gems, but when I run 'gem 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
    >>
    >> Can I repare 'gems? If not should I remove ruby1.9.2, rubygems1.3.7 and
    >> start again?
    >>
    >> It may be worth mentioning that I built these packages on Debian Lenny
    >> from source, and they are not in the database used by 'apt' etc.
    >>
    >> I have tried removing all traces of Ruby and rubygems from the system,
    >> then rebuilding and installing ruby1.9.2
    >>
    >> Thanks,
    >> Jen.
    >>
    >>

    > possibly you just need to do the following to add the missing zlib
    > header files:
    >
    > sudo aptitude install zlib1g-dev
    >
    > you might also want to add these header files(if you have not already)
    >
    > sudo aptitude install libc6-dev libssl-dev
    > sudo aptitude install libreadline6-dev zlib1g-dev libsqlite3-dev
    >
    > once you have a working ruby install rails and sqlite3
    >
    > sudo gem install rails
    > sudo gem install sqlite3-ruby
    >
     
    Jen, Oct 31, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luke Kenneth Casson Leighton
    Replies:
    0
    Views:
    504
    Luke Kenneth Casson Leighton
    Dec 31, 2008
  2. Iñaki Baz Castillo
    Replies:
    14
    Views:
    266
    Iñaki Baz Castillo
    Apr 5, 2009
  3. Philip Ross
    Replies:
    3
    Views:
    184
    Phil Ross
    Apr 16, 2009
  4. Abhishek Singh

    Problem in ruby1.9 gems

    Abhishek Singh, Sep 2, 2009, in forum: Ruby
    Replies:
    3
    Views:
    117
    Axel Etzold
    Sep 2, 2009
  5. Iñaki Baz Castillo
    Replies:
    7
    Views:
    705
    Rick DeNatale
    Dec 3, 2009
Loading...

Share This Page