Bundler finds the wrong version of ruby
<p>I'm using OS X 10.10.5 (Yosemite).  I'm trying to clone the <a href="https://github.com/MacDownApp/macdown" rel="noreferrer">github repo</a> for MacDown.  The instructions in the README say that after cloning one should do</p>

<pre><code>git submodule init
git submodule update
bundle install
bundle exec pod install
</code></pre>

<p>I'm not a ruby programmer, so I had to install Bundler.  The first two steps ran fine, but when I tried to run <code>bundle install</code> I got the error</p>

<pre><code>activesupport-5.0.0.1 requires ruby version &gt;= 2.2.2, which is incompatible with the current version, ruby 2.0.0p481
</code></pre>

<p>So I tried <code>brew install ruby</code> and now I have</p>

<pre><code>saul@miniMac ✓ ruby --version
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin14]
</code></pre>

<p>However, <code>bundle install</code> gives me the same error message as before.  It's clear that it's finding the ruby at <code>/usr/bin/ruby</code> instead of the one at <code>/usr/local/bin/ruby</code>.  How do I correct this?</p>

<p>I thought that perhaps the problem was that I had installed bundler before upgrading ruby, neither <code>sudo gem uninstall bundler</code> nor <code>sudo gem uninstall bundle</code> has any effect, and I don't know what else to try.  </p>

<p>Here is all the output, in case it's relevant:</p>

<pre><code>saul@miniMac ✓ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies...
activesupport-5.0.0.1 requires ruby version &gt;= 2.2.2, which is incompatible with
the current version, ruby 2.0.0p481
</code></pre>

<p>EDIT: </p>

<p>Thanks for the suggestions.  I tried <code>gem install bundler</code> again, but it didn't help.  I got the same error message.  Here's what I get from <code>bundle env</code></p>

<pre><code>saul@miniMac ✗ bundle env
Environment

    Bundler   1.13.6
    Rubygems  2.0.14
    Ruby      2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
    Git       2.5.4 (Apple Git-61)

Gemfile

    source 'https://rubygems.org'

    gem 'cocoapods', '0.39.0'

Gemfile.lock

&lt;No /Users/saul/Projects/macdown/Gemfile.lock found&gt;
</code></pre>

<p>EDIT 2:</p>

<pre><code>saul@miniMac ✓ which -a bundle
/usr/local/bin/bundle
/usr/bin/bundle
</code></pre>