title: Ruby not recognising gems from local source, included in Gemfile
body: <p>I've had some trouble with gems from a local source before, so set up a simple test project. I haven't had <code>simple-rss</code> installed before. This is my Gemfile:</p>
  
  <pre><code>source 'https://rubygems.org'
  
  gem 'simple-rss', :path =&gt; '~/code/simple-rss'
  </code></pre>
  
  <p>I then run <code>bundle install</code>, it tells me:</p>
  
  <pre><code>Using simple-rss 1.2.3 from source at `~/code/simple-rss`
  Using bundler 1.12.4
  Bundle complete! 1 Gemfile dependency, 2 gems now installed.
  </code></pre>
  
  <p>So then I make test.rb in the same folder as the Gemfile. The test.rb file only has the <code>require</code> right now:</p>
  
  <pre><code>require 'simple-rss'
  </code></pre>
  
  <p>I run <code>ruby test.rb</code>, and get this error:</p>
  
  <pre><code>/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- simple-rss (LoadError)
      from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from test.rb:1:in `&lt;main&gt;'
  </code></pre>
  
  <p>So that's the first evidence of a problem. I then do:</p>
  
  <p><code>sudo gem install simple-rss</code></p>
  
  <p>That successfully installs it. I do <code>ruby test.rb</code> again, and get no issues. So it's able to run the gem from the <em>original source</em> once it's been installed with gem install, but not from the <em>local source</em> after running with Bundler.</p>