I totally messed up rubygems (deleted the sources gem) and now Ican't install any gem anymore

Discussion in 'Ruby' started by kazaam, Nov 1, 2007.

  1. kazaam

    kazaam Guest

    Okay I had some troubles today and wanted to do a total reinstallation of rubygems and all gems I had. So I removed rubygems with:
    sudo apt-get remove --purge rubygems
    and then I did the big mistake and deleted the whole gems folder:
    sudo rm -rd /var/lib/gems/1.8/gems

    Now I have a big problem. I reinstalled rubygems but when I wanna install any gem I'm getting an error like this:
    $: sudo gems install hpricot
    /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’: no such file to load — sources (LoadError)
    from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require’
    from /usr/lib/ruby/1.8/rubygems/remote_installer.rb:462:in `sources’
    [..]

    I now found out the problem is I need a sources gem? I found out that I still have this gem in the gems/cache folder:
    /var/lib/gems/1.8/cache/sources-0.0.1.gem

    But how to install? If I do
    sudo gem install -local /var/lib/gems/1.8/cache/sources-0.0.1.gem

    I also get the same error like above:
    /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’: no such file to load — sources (LoadError)

    I have no idea how to fix this now? Can someone help me with this?

    greets
    --
    kazaam <>
     
    kazaam, Nov 1, 2007
    #1
    1. Advertising

  2. kazaam

    Guest

    If you threw out the gems dir, but not the gems cache, your cache is
    probably inaccurate. I'd say just throw out the cache and try again.

    On 11/1/07, kazaam <> wrote:
    > Okay I had some troubles today and wanted to do a total reinstallation of rubygems and all gems I had. So I removed rubygems with:
    > sudo apt-get remove --purge rubygems
    > and then I did the big mistake and deleted the whole gems folder:
    > sudo rm -rd /var/lib/gems/1.8/gems
    >
    > Now I have a big problem. I reinstalled rubygems but when I wanna install any gem I'm getting an error like this:
    > $: sudo gems install hpricot
    > /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load — sources (LoadError)
    > from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require'
    > from /usr/lib/ruby/1.8/rubygems/remote_installer.rb:462:in `sources'
    > [..]
    >
    > I now found out the problem is I need a sources gem? I found out that I still have this gem in the gems/cache folder:
    > /var/lib/gems/1.8/cache/sources-0.0.1.gem
    >
    > But how to install? If I do
    > sudo gem install -local /var/lib/gems/1.8/cache/sources-0.0.1.gem
    >
    > I also get the same error like above:
    > /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load — sources (LoadError)
    >
    > I have no idea how to fix this now? Can someone help me with this?
    >
    > greets
    > --
    > kazaam <>
    >
    >



    --
    Giles Bowkett

    Blog: http://gilesbowkett.blogspot.com
    Portfolio: http://www.gilesgoatboy.org
    Tumblelog: http://giles.tumblr.com/
     
    , Nov 1, 2007
    #2
    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. Eric Lilja
    Replies:
    4
    Views:
    486
  2. Chumley the Walrus
    Replies:
    2
    Views:
    254
    Tom Gosselin
    Aug 10, 2004
  3. Trevor
    Replies:
    5
    Views:
    573
    Bill Kelly
    Jan 29, 2005
  4. Austin 7873
    Replies:
    5
    Views:
    190
    Eric Hodel
    Jan 27, 2007
  5. Forex Forex
    Replies:
    3
    Views:
    106
    Forex Forex
    Nov 7, 2008
Loading...

Share This Page