I tried upgrading my version of rubygems to the most current version by running
sudo gem update --system
Which introduced this error:
/usr/bin/gem:23: uninitialized constant Gem::GemRunner(NameError)
whenever I tried to run rubygems. On the rails forum, I found a fix for it!
Simply add the line to the file /usr/bin/gem (may be different on a mac)
require 'rubygems/gem_runner'
after
require 'rubygems'
This fixed the issue in both Ubuntu and OS 10.4.


Some more info on this gem runner error here:
http://blog.ra66i.org/archives/informatics/2007/12/23/a-quick-gem-101-faq-gemrunner-name-error/
Enjoy.
raggi
January 1st, 2008
Thanks, this helped me (once I figured out that the file I’m adding it to is /usr/bin/gem that is :)
Hurt Reynolds
January 2nd, 2008
Great fix!
Syntaxius
January 3rd, 2008
found your tip via google. that helps. thanks ~
wilcohol
January 3rd, 2008
Thanks Nick - that was a big help! Any ideas why this bug exists in Ubuntu? I’m using 7.10.
-Dave
Dave
January 4th, 2008
Thanks, I had the same problem and this fixed it for me as well. I’m using Ubuntu 7.04.
-Aric
Aric
January 9th, 2008
@hurt - Thanks. I made a change to reflect the appropriate file for Ubuntu.
@Dave - I’m not sure. I was experiencing the same issue in OSX, so I think it was a bug in the gem software.
Nick
January 9th, 2008
thanks! Great Help
ochko
January 10th, 2008
THANKS!
Rizwan Reza
January 12th, 2008
Worked on Mac 10.5
you rock.
philip
January 14th, 2008
10x! saved me a lot of time! :)
slony
January 14th, 2008
Super. Worked for me as well.
Ubuntu ver 7.04
ktheking
January 15th, 2008
hi, found this via google. had this bug on freebsd 6.2-release, too.
britneyfreek
January 15th, 2008
Thank You !!!
4-No0!3-15
January 16th, 2008
Thanks!
Donnie
January 16th, 2008
Thanks a lot! Just what I needed.
Lenart
January 18th, 2008
Thanks :D You’re a lot of people’s hero.
Ed Anderson
January 18th, 2008
thank you!
assente
January 19th, 2008
I know it’s a little redundant, but thank you!
Calvin
January 19th, 2008
Thanks - yet again. Very fast find and fix.
Mike Lunt
January 20th, 2008
Thanks
Hugo
January 22nd, 2008
Thanks, this worked with Solaris on Joyent too!
Luke Noel-Storr
January 23rd, 2008
thanks much for this!
Jason
January 24th, 2008
THANKS!
Sebastian
January 25th, 2008
Oh yeahh! It`s works
mikahilov
January 25th, 2008
Wow, you save me so mutch time !
Thank you!
Carl
Carl Pelletier
January 25th, 2008
Yet again: thanks!
I just tried Ubuntu 7.10 for the first time and its great - except for this little bug.
JohnB
January 25th, 2008
Thank you!
chris
January 28th, 2008
That worked for me…. many thanks!!
Zack
January 29th, 2008
Thanks… great help! Solved in Ubuntu Ultimate Edition.
ffteixeira
January 29th, 2008
Thank you!!!!
Cristiano87
January 29th, 2008
Thanks. Worked for me on a fb dev Joyent Accelerator running Solaris after updating to RubyGems 1.0.1.
Erik P
January 29th, 2008
Thanks a lot!..
grkn
January 30th, 2008
Thanks! Had this problem when updating a Debian box.
hutchman
February 3rd, 2008
found via google. Thanks!
dave
February 3rd, 2008
Thanks, worked for me in Ubuntu 7.10
Denis
February 4th, 2008
Thanks for posting this– found via Google and it fixed my problem.
Brandon Harper
February 5th, 2008
Google led me here, you’re number one for this error! Thanks a lot!
Kolja
February 5th, 2008
Really thx!
Dzs
February 6th, 2008
Thanks for posting this!
Chris
February 7th, 2008
Thank you sir!
Works… phew… Back to rails now… :D
Raju
February 10th, 2008
Thanks… That Worked
Frank
February 11th, 2008
You have resolved my problem.
Really thank you.
Riccardo Solimena
February 12th, 2008
Nice!
Thank you.
Kosh
February 15th, 2008
tkstkstks!
fotanus
February 15th, 2008
great — very helpful — good work
tim
February 24th, 2008
Nice. Worked for me. Thanks.
Marcus
February 24th, 2008
Thanks a lot - got things working again
Tyler
February 28th, 2008
excellent. cheers for post
Andy GOUNDRY
March 8th, 2008
10x a lot, found you by google :)
Portal
March 9th, 2008
Thanks for this - happy again.
UK Credit Fraud
March 10th, 2008
Your fix should be ranked so much higher on Google. I went through so much shit, before I got to your solution. Did it and it worked fine! Thanks.
Word of advice to my fellow n00bs. If you can’t edit the file it’s because of permissions. Open up a terminal. Go to the folder where it’s located. Then type:
sudo gedit gem
Zach
March 14th, 2008
Thanks! … my system was broken.
Todd
March 18th, 2008
Works on SuSE 10.3 and you’re still 1st hit on Google. Thanks for posting the fix.
James
March 20th, 2008
Thanks! Google got me here too. Easy fix saved much time.
Ken Weiner
April 6th, 2008
THANK YOU!
brittany
April 10th, 2008
thanks! that helps!!
zain alabdin tawfiq
April 13th, 2008
Great Fix!! Thanks!
rugger
April 21st, 2008
works! thanks a lot for the help.
Omar Bohsali
April 22nd, 2008
I’m the 1234th person to say thanks man.
now get off this wordpress garbage and on to a real blog platform… mephisto or typo :-)
thanks again.
nerb
April 27th, 2008