title: NoMethodError: undefined method `spec' for nil:NilClass - active_utils, factory_girl and more gems failing
body: <p>Out of nowhere, and without changing anything, I've started getting this error (and so did other people on the team). </p>
  
  <p>This is happening for some gems (the ones specifying a git branch) and is only happening when we recreate the environment (in vagrant). We didn't change anything.</p>
  
  <p>Any ideas? More info follows:</p>
  
  <pre><code>Using active_utils (2.0.0) from git://github.com/Shopify/active_utils.git (at v2.0.0)
  NoMethodError: undefined method `spec' for nil:NilClass
  An error occurred while installing active_utils (2.0.0), and Bundler cannot continue.
  Make sure that `gem install active_utils -v '2.0.0'` succeeds before bundling.
  
  Using factory_girl (2.6.5) from https://github.com/thoughtbot/factory_girl (at 2.6.x)
  NoMethodError: undefined method `spec' for nil:NilClass
  An error occurred while installing factory_girl (2.6.5), and Bundler cannot continue.
  Make sure that `gem install factory_girl -v '2.6.5'` succeeds before bundling.
  </code></pre>
  
  <ul>
  <li>Running "gem install active_utils -v '2.0.0'" works but bundle always
  fails.  </li>
  <li>Cleared gem cache, but didn't help</li>
  </ul>
  
  <p>Seems like it's all entries in Gemfile specifying a branch that started  failing.</p>
  
  <pre><code>gem 'active_utils', :git =&gt; 'git://github.com/Shopify/active_utils.git', :branch =&gt; 'v2.0.0'
  gem "will_paginate", :git =&gt; "git://github.com/mislav/will_paginate.git", :branch =&gt; "2-3-stable"
  </code></pre>