Your "old" gems would be relative to the Ruby that came bundled with the Mac because the `gem` command is included with Ruby 1.8.7, which is stock on Snow Leopard. If your `which ruby` shows `/usr/bin/ruby`, your gem environments should be similar to:
- GEM PATHS:
- /Library/Ruby/Gems/1.8
- /Users/greg/.gem/ruby/1.8
- /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
If you are using RVM you *might* be able to tell it to [copy your gems](
[To see links please register here]
) from the `system` gemset to one under RVM's control. I haven't tried doing that as I install RVM immediately and let it handle all my Ruby installation and then I ignore the system's installation.
If your `which ruby` shows `/usr/local/bin/ruby` then the `gem env` command should reflect the changed path for the version you compiled from source.
I'm curious *WHY* you would build it manually, when [`RVM`](
[To see links please register here]
) is available to handle all the [configuration and installation](
[To see links please register here]
), and largely remove any concerns about *where* things are and whether you've just stomped on the system's installed version.
When RVM has installed a Ruby version, it will all be in `~/.rvm` and your Gems will be nicely located there too. You'll be able to [manage the gems](
[To see links please register here]
) as [gemsets](
[To see links please register here]
), relative to each version of Ruby, and switch back and forth instantly. Or, even better, you can run a command/program in each version of Ruby you have installed to test them using [`rvm ruby 'some command'`](
[To see links please register here]
).
Notice in the above `gem env` output that gems are in three separate areas on the disk. Under RVM's control they're in RVM's sandbox:
- GEM PATHS:
- /Users/greg/.rvm/gems/ruby-1.9.2-p0
- /Users/greg/.rvm/gems/ruby-1.9.2-p0@global
That makes it trivial for me to back them up, or blow them away if I want to.
I used to compile my rubies from source on my Macs and Linux boxes. I use RVM for that now. It's so much better than doing it by hand.