After updating RubyGems I got the following error message:
1 2 | /usr/bin/gem:10: undefined method `manage_gems' for Gem:Module (NoMethodError) # |
Nice. So I took a look at the output that was generated and came across this:
1 2 3 4 | Deprecation Notices: * Gem::manage_gems has been removed. * Time::today will be removed in RubyGems 1.4. |
Now what? Right – fix it.
1 | sudo vim /usr/bin/gem |
Search “Gem.manage_gems” and remove it or replace it with
1 | #Gem.manage_gems |
Unfortunately i got this
1 2 | /usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError) # |
when running the gems command. After “googling” I came up with this:
1 | sudo vim /usr/bin/gem |
inserting
1 | require 'rubygems/gem_runner' |
so that the first lines of /usr/bin/gem look like this
1 2 3 | require 'rubygems' require 'rubygems/gem_runner' #Gem.manage_gems |
Fixed.
Thx. It solved my problem.
Thanks!! It works for me too!
Thanks
=)
Thanks a lot man !
Thanks 2!!!
You’re my hero
Thanks a ton.
Great !
Problem solved on Ubuntu / ruby 1.86
Thanks !
Just what I was looking for!! Thank you very much.
Nice one, fixed my issue and allowed me to install a specific version of rails. Thank you!
Worked here too. Dumb bugs! hahah
That did the trick on Xubuntu 8.04. Thanks for the gem.
thank you for this fix. that saved my day!
Tnx!
Thank a lots
Thanks a bunch!
I really thanks for your effort on this. I also faced this problem. I went through your modification wherever is needed. It works fine for me. Thanks man.
Thanks a lot!
Respect!
Thanks! It worked for me too. Good on ya for sharing.
Thanks man! You rock
Thank’s that helped
Hmm, couldn’t you just replace /usr/bin/gem with /usr/bin/gem1.8? That’s what got installed by update_rubygems.
To fix it I just did:
sudo mv /usr/bin/gem1.8 /usr/bin/gem
thanks so much!!!
Thanks for the info!
very logical..: )
Thx!
Thanks a bunch!!
thx saved my day!
Thanks a lot for posting the solution to this issue!
Thanks!
Thanks!!
Yay, thanks.
Man, this is awesome. i saw this post previously, but blog theme is vired and I didn’t saw explanation text at all
Thanks, that’s what I was looking for.
Thanks ,very good to do
Thanks! it worked for me and I’m a total noob…
Didn’t. Ruby sucks.
Thanks! Muchas gracias!
Thanks. But how do you know this is the one that need to be written?
Very nice.
Thanks! Your still saving people with this tip! Found this on 3 Ubuntu 8.04 boxes today, couldn’t figure out what to do until I found your fix.
You r da walrus! I wasted an evening,.. and then found yr post. Now all is sunshine and champagne! Guys like you need a medal (or a holiday in the Pacific with a bevy of babes!). Cheers, Man!
Thanks. This happened to me today seven months after your post. Which makes me wonder, how come the code has not been fixed.
A number of curious people might have been put off Ruby during their very first encounter.
Thanks again, this kind of issue drives me mad. If only it just worked.
This helped me to solve my problem while upgrading from rails 1.2.3 to 1.2.6. Thanks.
Thanks for that. It’s done the trick – I need things to Just Work to get by my boss and was beginning to get very annoyed at Ruby today!
On ubuntu hardy, I found this happened after doing “gem update –system”, which seemed to update /usr/bin/gem1.8 but not /usr/bin/gem. So I fixed this way instead:
rm /usr/bin/gem
ln -s /usr/bin/gem1.8 /usr/bin/gem
Brilliant! Thank you!
Thanks !! Great post.