title: Bundler "Could not find rake" "in any of the sources"
body: <p>I have a rake task with a namespace encompassing two tasks, <code>start</code> and <code>stop</code>. I <code>namespace:stop</code>ped, then <code>namespace:start</code>ed again, and then ... bundler blew up at me:</p>
  
  <pre><code>/home/user/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.5/lib/bundler/spec_set.rb:87:in `block in materialize': Could not find rake-12.0.0 in any of the sources (Bundler::GemNotFound)
      from /home/user/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.5/lib/bundler/spec_set.rb:80:in `map!'
      from /home/user/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.5/lib/bundler/spec_set.rb:80:in `materialize'
      from /home/user/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.5/lib/bundler/definition.rb:176:in `specs'
      from /home/user/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.5/lib/bundler/definition.rb:235:in `specs_for'
      from /home/user/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.5/lib/bundler/definition.rb:224:in `requested_specs'
      from /home/user/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.5/lib/bundler/runtime.rb:118:in `block in definition_method'
      from /home/user/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.5/lib/bundler/runtime.rb:19:in `setup'
      from /home/user/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.5/lib/bundler.rb:100:in `setup'
      from /home/user/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.5/lib/bundler/setup.rb:20:in `&lt;top (required)&gt;'
      from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
  </code></pre>
  
  <p><code>bundle install</code> works, <code>rake, version 12.0.0</code> is installed, <code>rails c</code> starts up fine. And Passenger with Apache displays the app without issue. I've re-installed rvm, Ruby, Rails, etc. <code>bundle exec rake namespace:start</code> and <code>bin\rake namespace:start</code> raise the same error message. </p>
  
  <p>I've posted this as <a href="https://github.com/bundler/bundler/issues/5478" rel="nofollow noreferrer">a bug in bundler</a> (<a href="https://gist.github.com/samnissen/3fd9230921127d7c11cf871f326b526a" rel="nofollow noreferrer">with environment details</a>), but maybe its not a bug, but a configuration issue with paths, permissions, or ... something?</p>