title: How to tell Terminal which version of Ruby to use?
body: <p>I have two related questions that I was hoping someone could help out with.</p>
  
  <ol>
  <li><p>I recently installed Ruby 1.9.2 on my Mac (running Snow Leopard 10.6.4) and I haven’t been able to figure out how to get Terminal to use the new Ruby as a default, rather than the factory-installed Ruby 1.8.7.  The old Ruby 1.8.7 is located in my <code>~/usr/bin/ruby</code> directory while the new Ruby 1.9.2 is in <code>~/usr/local/bin/ruby</code>.  Someone said that I need to put the new version of Ruby's directory in the PATH prior to the old version's directory so that the system looks there first - is this correct?  If so, can anyone provide step by step instructions on how to do this? </p></li>
  <li><p>I’ve created a new directory but can’t seem to figure out the correct way to add that directory to my PATH using the Terminal bash shell.  I tried using the instructions that I found here (<a href="http://www.macgasm.net/2008/04/10/ad...thin-terminal/" rel="nofollow noreferrer">http://www.macgasm.net/2008/04/10/ad...thin-terminal/</a>) twice but they didn't work for me.  The directory containing my program ("Ruby_Programs") shows up in the PATH but when I try to run "ruby newprogram.rb" from the command line it results in <code>":ruby: No such file or directory -- newprogram.rb (LoadError)"</code>.  The file definitely exists and is a functional Ruby program.  I did change the name of the directory to "Ruby Programs" and then back to "Ruby_Programs" - could that have somehow caused this problem?</p></li>
  </ol>
  
  <p>Any help would be greatly appreciated.  Here is my current PATH:</p>
  
  <pre><code>$ echo $PATH
  /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/sbrriffe/src:/usr/X11/bin:/Users/sbriffe/Ruby_Programs/:
  </code></pre>