tag:help.rubygems.org,2010-01-19:/discussions/problems/271-setting-ruby-executable-pathRubyGems.org: Discussion 2018-10-18T19:50:58Ztag:help.rubygems.org,2010-01-19:Comment/24842922010-08-05T18:50:44Z2010-08-05T18:50:44ZSetting ruby executable path<div><p>Install ruby in a different location.</p></div>Eric Hodeltag:help.rubygems.org,2010-01-19:Comment/24842922010-08-11T16:35:07Z2010-08-11T16:35:09ZSetting ruby executable path<div><p>That does not answer the question. When you have multiple versions of ruby installed (such as debian/ubuntu's one and one compiled from source), how do I tell gem to use my newly compiled ruby instead of my distributiion's version?</p></div>rontag:help.rubygems.org,2010-01-19:Comment/24842922010-08-11T20:14:01Z2010-08-11T20:14:01ZSetting ruby executable path<div><p>Set your PATH env var to prefer your newly compiled ruby or use a complete path to the newly installed ruby's <code>gem</code>. <code>gem</code> is installed alongside the <code>ruby</code> it was installed with (/usr/local/bin/ruby will have /usr/local/bin/gem after installing RubyGems).</p>
<p>PS: I did answer the question you asked. If you want to know how to do a specific thing you will need to ask a specific question. We can't read your mind through the internet</p></div>Eric Hodeltag:help.rubygems.org,2010-01-19:Comment/24842922010-08-12T08:37:24Z2010-08-12T08:37:25ZSetting ruby executable path<div><p>Thanks for your reply.<br />
I found the cause of my confusion: I complied ruby but I did not compile gem, thus the system picked up my OS's version of gem. Thus my PATH was correct without leading to the expected result.</p>
<p>Anyway, I also found a great solution to all version issues: RVM (<a href="http://rvm.beginrescueend.com">http://rvm.beginrescueend.com</a>). Takes a little bickering to install and understand at first, but will save you <em>tons</em> of trouble later.</p></div>ron