title: capistrano script fails because a test-group gem is not found
body: <p>I'm deploying to a staging server which is running in environment=development. My deploy script fails with the message <code>Could not find gem 'webmock (&gt;= 0) ruby' in the gems available on this machine.</code> but I cannot see why the script should ever need that gem because my Gemfile only lists it in the <code>test</code> group.</p>
  
  <p>Do you have any idea why my staging server is trying to require webmock during deployment?</p>
  
  <p><strong>My deploy script</strong></p>
  
  <p>Here is the command from my deploy script fails:</p>
  
  <p><code>executing ["cd /var/www/clu2/staging/releases/20130429170940 &amp;&amp; bundle exec whenever --update-crontab staging --set environment=development --roles db"]</code></p>
  
  <p>One command earlier, the script runs <code>bundle install</code>, omitting the <code>test</code> gems:</p>
  
  <p><code>executing ["cd /var/www/clu2/staging/current &amp;&amp; bundle install  --without=test --no-update-sources"]</code></p>
  
  <p><strong>My usage of webmock is only in test</strong></p>
  
  <p>You can see that webmock is only required in my spec_helper file:</p>
  
  <pre><code>$ grep -r webmock .
  ./Gemfile:  gem "webmock"
  ./Gemfile.lock:    webmock (1.11.0)
  ./Gemfile.lock:  webmock
  ./spec/spec_helper.rb:  require "webmock/rspec"
  </code></pre>
  
  <p>You can see that webmock is specified as a test gem in my Gemfile:</p>
  
  <pre><code>group :test do
    gem 'spork-rails' # pre-load rails environment for faster test launches
    gem "webmock"
  end
  </code></pre>