I finally got around to installing the latest Ruby version onto my Mac
instead of using the one that comes with Mac OS X. I followed the
instructions here:

http://maczealots.com/tutorials/rubyosa/

Doing so, I installed readline 5.2, then built and installed Ruby
1.8.6, then installed rubygems 0.9.3. (Notice that in the link above
it says to install readline 5.1 and rubygems 0.9.2, but I just
downloaded the latest versions at the time.

Everything seems to work fine, except rubygems. Whenever I issue a
command, I get an error about an uninitialized constant. E.g.:

> gem list -r

*** REMOTE GEMS ***
ERROR:  While executing gem ... (NameError)
    uninitialized constant Gem::SourceInfoCache

> gem install rubyosa
ERROR:  While executing gem ... (NameError)
    uninitialized constant Gem::RemoteInstaller

Can somebody help me?

Before you ask, yes I installed everything into /usr/local, and yes I
made sure /usr/local/bin is first in my path. Doing "which ruby" and
"ruby -v" both confirm that I am running ruby 1.8.6 from /usr/local/
bin. Are there any other environment variables I need to set to enable
rubygems?