title: Why do I get the error "Your Ruby version is 2.0.0, but your Gemfile specified 2.2.2" although I have 2.2.2 installed
body: <p>I'm using rbenv and I get the error <code>Your Ruby version is 2.0.0, but your Gemfile specified 2.2.2</code> when I run the <code>bundle install</code> command in my project. The strange thing is that I've actually got the 2.2.2 version installed (as my Gemfile specifies), and not the 2.0.0 version. (See image below).</p>
  
  <p><a href="https://i.stack.imgur.com/0tLU2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0tLU2.png" alt="enter image description here"></a></p>
  
  <p>I tried the solution offered in this thread: <a href="https://stackoverflow.com/questions/23039528/your-ruby-version-is-2-0-0-but-your-gemfile-specified-2-1-0">Your Ruby version is 2.0.0, but your Gemfile specified 2.1.0</a>, but it had no effect.</p>
  
  <p>I'm on an MacBook Air with Yosemite if that makes any difference.</p>
  
  <p>Update:</p>
  
  <ul>
  <li><code>which ruby</code> -> <code>Users/myuser/.rbenv/shims/ruby</code></li>
  <li><code>ruby -v</code> -> <code>ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]</code> </li>
  <li><code>rbenv global 2.2.2</code> and <code>rbenv rehash</code>, has no effect</li>
  <li><code>which bundle</code> -> <code>/usr/bin/bundle</code></li>
  <li><code>gem env</code>-> - <code>GEM PATHS:</code>
  
  <ul>
  <li><code>/Users/myuser/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0</code></li>
  <li><code>/Users/myuser/.gem/ruby/2.2.0</code></li>
  </ul></li>
  </ul>