title: How should I set PATH when using rbenv with bundler and rails
body: <p>I'm venturing back into Ruby and Rails and giving rbenv a try at the same time.  I'm on a Mac (10.14) if that matters.  I'm using</p>
  
  <ul>
  <li>Bundler version 2.0.1</li>
  <li>Rails 6.0.0.rc1</li>
  <li>ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]</li>
  <li>rbenv 1.1.2</li>
  </ul>
  
  <p>My <code>~/.bundle/config</code> file has:</p>
  
  <pre><code> ----
   BUNDLE_PATH: ".bundle/gems"
   BUNDLE_BIN: ".bundle/bin"
   BUNDLE_DISABLE_SHARED_GEMS: "true"
   BUNDLE_CACHE_PATH: "/Users/xxx/.bundle/cache"
   BUNDLE_CACHE_ALL: "true"
  </code></pre>
  
  <p>I do a simple <code>rails init foo</code> followed by <code>cd foo</code> and I find that I have three bin directories of interest:</p>
  
  <ul>
  <li>.bundle/bin</li>
  <li>.bundle/gems/bin</li>
  <li>bin</li>
  </ul>
  
  <p>My normal path has <code>/Users/xxx/.rbenv/shims</code> at the front.  If I do <code>type rake</code> or <code>type rails</code> I get the one in the shims directory such as <code>/Users/xxx/.rbenv/shims/rake</code></p>
  
  <p>My question is: should I put one of the three bin directories listed above into my PATH and if so, which ones and which order?</p>
  
  <p>My belief is that the correct thing to do is to add the full path to the <code>.bundle/bin</code> directory followed by the full path to the <code>bin</code> directory followed by my usual PATH.  Is that correct?</p>