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

K

kazaam

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
 
G

gilesb

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.

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


--
Giles Bowkett

Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com/
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top