title: Bundler not working with rbenv, could not find [gem]
body: <p>I've just made the switch from rvm to <strong>rbenv</strong> and I'm trying to use bundler for gem management. After running <code>bundle install</code> and trying to run a simple sinatra app (<code>ruby app.rb</code>), I get this:</p>
  
  <pre class="lang-none prettyprint-override"><code>Could not find haml-3.1.4 in any of the sources
  Run `bundle install` to install missing gems.
  </code></pre>
  
  <p>Running <code>bundle install</code> again had no effect. Also tried <code>bundle update</code> as suggested by another question response.</p>
  
  <p>This is my Gemfile:</p>
  
  <pre><code>source "http://rubygems.org"
  
  gem "sinatra"
  gem "haml"
  </code></pre>
  
  <p>This is what <code>bundle show</code> produces</p>
  
  <pre class="lang-none prettyprint-override"><code>* bundler (1.0.22)
  * haml (3.1.4)
  * rack (1.4.1)
  * rack-protection (1.2.0)
  * sinatra (1.3.2)
  * tilt (1.3.3)
  </code></pre>
  
  <p>This is what my app requires:</p>
  
  <pre><code>require "rubygems"
  require "bundler/setup"
  require 'sinatra'
  </code></pre>
  
  <p>I'm convince that this is some kind of path issue where bundler and rbenv aren't playing along. I've tried looking through rbenv's documentation but was not able to find to anything.</p>
  
  <p><em>Note: In a different sinatra app I get the following when trying to run it:</em></p>
  
  <pre class="lang-none prettyprint-override"><code>Could not find addressable-2.2.7 in any of the sources
  Run `bundle install` to install missing gems.
  </code></pre>
  
  <hr>
  
  <h2>Supplemental info</h2>
  
  <p><code>echo $PATH</code><br>
  <code>/Users/uri/.rbenv/shims:/Users/uri/.rbenv/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin</code></p>
  
  <p><code>which bundle</code><br>
  <code>/Users/uri/.rbenv/shims/bundle</code></p>
  
  <h2>Update</h2>
  
  <p>If I do <code>bundle install --system</code> it works. Although I can't see this as being a viable solution.</p>