Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Your "old" gems would be relative to the Ruby that came bundled with the Mac because the <code>gem</code> command is included with Ruby 1.8.7, which is stock on Snow Leopard. If your <code>which ruby</code> shows <code>/usr/bin/ruby</code>, your gem environments should be similar to:</p> <pre><code>- 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 </code></pre> <p>If you are using RVM you <em>might</em> be able to tell it to <a href="http://rvm.beginrescueend.com/gemsets/copying/" rel="noreferrer">copy your gems</a> from the <code>system</code> 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.</p> <p>If your <code>which ruby</code> shows <code>/usr/local/bin/ruby</code> then the <code>gem env</code> command should reflect the changed path for the version you compiled from source.</p> <p>I'm curious <em>WHY</em> you would build it manually, when <a href="http://rvm.beginrescueend.com/" rel="noreferrer"><code>RVM</code></a> is available to handle all the <a href="http://rvm.beginrescueend.com/rvm/install/" rel="noreferrer">configuration and installation</a>, and largely remove any concerns about <em>where</em> things are and whether you've just stomped on the system's installed version.</p> <p>When RVM has installed a Ruby version, it will all be in <code>~/.rvm</code> and your Gems will be nicely located there too. You'll be able to <a href="http://rvm.beginrescueend.com/rubies/rubygems/" rel="noreferrer">manage the gems</a> as <a href="http://rvm.beginrescueend.com/gemsets/" rel="noreferrer">gemsets</a>, 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 <a href="http://rvm.beginrescueend.com/set/ruby/" rel="noreferrer"><code>rvm ruby 'some command'</code></a>.</p> <p>Notice in the above <code>gem env</code> output that gems are in three separate areas on the disk. Under RVM's control they're in RVM's sandbox:</p> <pre><code>- GEM PATHS: - /Users/greg/.rvm/gems/ruby-1.9.2-p0 - /Users/greg/.rvm/gems/ruby-1.9.2-p0@global </code></pre> <p>That makes it trivial for me to back them up, or blow them away if I want to.</p> <p>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.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload