Note that there are some explanatory texts on larger screens.

plurals
  1. POMultiple installs of Ruby -- how to solve in OS X
    text
    copied!<p>I'm having problems with Ruby scripts finding the right gems. It seems this is related to having multiple installs of Ruby on my system. OS X already comes with Ruby but it's not the latest one. I upgraded from Snow Leopard to Lion and suddenly have all these instances of the rubygems folders:</p> <pre class="lang-none prettyprint-override"><code> /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems /Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems /Library/Ruby/Gems/1.8/gems/rubygems-update-1.8.11/lib/rubygems /Library/Frameworks/MacRuby.framework/Versions/0.10/usr/lib/ruby/1.9.2/rubygems /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems /Users/[user_name]/.rvm/repos/ruby/lib/rubygems </code></pre> <p>I installed the graph gem with <code>gem install</code> and I can't seem to find it in any of these locations. irb finds it when I do a <code>require</code> but a ruby script saved and run from the CLI produces the error:</p> <blockquote> <p>'require': no such file to load</p> </blockquote> <p>Another clue is that when running <code>rails server</code> I often see output from <code>/Library/Ruby/Gems/1.8/gems/</code></p> <p>But the graph gem doesn't seem to be in that path either. </p> <p>So, yes a big mess. Any help to safely simplify this and remove the redundant instances would be greatly appreciated.</p> <p><strong>Update:</strong></p> <p>Was able to track the installed gems to: <code>/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/ruby/user-gems/1.8/gems</code></p> <p>So should I just delete everything else with a <code>rm -rf</code>? I'd hate to do that and cause all sorts of dependency problems. Ultimately I'd like to end up with a clean system with only one ruby install but I cannot wipe out my hard drive. </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