From: Eric Hodel Date: 2008-07-23T15:01:47+09:00 Subject: Re: Rubygems - uninitialized constant On Jul 18, 2008, at 03:14 AM, Tom Cloyd wrote: > Tom Cloyd wrote: >> With a fresh install of Rubygems, when I issue a "gem -h" command, >> the result is: >> /usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError) >> Background: >> With a fresh installation of Kubuntu 8.04.1 Linux, I installed ruby >> 1.8 with "apt-get...", and then installed rubygems 1.8 from the tar >> file at rubyforge. There were problems, so I figured the rubygems >> install done that way was a bad idea. Basically, I was getting an >> odd message when trying to install the webby gem. Three other gems >> did install without error, including sequel. >> So, I reinstalled ruby 1.8, and rubygems from the Adept package >> manager, at which point I got the unexpected problem above. >> I don't know what's wrong or how to get a good install of rubygems, >> at this point. All suggests greatly appreciated. >> Thanks, >> Tom > > Thanks to a kind soul on the Webby list (there's NEVER anyone there > this time of night - but Doug Livesey was, tonight - tks Doug!) I > now have the fix on this - > > http://ericbeland.com/2007/12/20/uninitialized-constant-gem-gemrunner > > /usr/bin/gem simply needs the following line inserted into it. > > require 'rubygems/gem_runner' > > Now things work. > > I hope this gets fix by someone, if such a response is needed. > Apparently its happened to other people. No, this is wrong. You have an old `gem` lying around. Recent RubyGems releases install gem to match your ruby binary's name, which is usually symlinked from something like `ruby1.8` to `ruby` (thus, `gem1.8`). Delete `gem` and symlink it appropriately. When you installed RubyGems the last thing it printed was where it installed the gem executable.