Topic: bundler/capistrano always tries to install deployment and test gems

The docs for bundler claim that "require 'bundler/capistrano'" uses deployment-friendly settings, and that in any case the setting   "set :bundle_without, [:development, :test]" will prevent bundler from trying to install gems in the test and development group.

I have found that this is basically never the case.   My deploys *always* try to install all the gems, including ones only in the :test group.   For example, with the following deploy.rb and Gemfile, it attempts to install factory_girl, webrat, nokogiri, rspec, capistrano, mongrel, and the rest.   What do I need to do to get a production-only gemset on the server?


gem 'rails', '3.0.3'
gem 'mysql'
gem 'paperclip'
gem "haml"
gem "will_paginate", "~> 3.0.beta"
gem 'tiny_mce'
gem 'authlogic', :git => 'git://', :branch => 'rails3'
gem 'be9-awesome_nested_set', :require => 'awesome_nested_set'
gem 'jquery-rails'

group :development, :test do
  gem "rspec", ">= 2.1.0"
  gem "rspec-rails", ">= 2.1.0"
  gem "factory_girl_rails"
  gem "webrat"
  gem 'ruby-debug'

group :development do
  gem "populator"
  gem "faker"
  gem "mongrel"
  gem "capistrano"
  gem "capistrano-ext"

Top of deploy.rb:

default_run_options[:pty] = true
ssh_options[:forward_agent] = true

require 'config/deploy/passenger'
require 'capistrano/ext/multistage'
require 'bundler'
require 'bundler/capistrano'
set :bundle_without,  [:development, :test]

set :scm, 'git'             
set :repository,  ""

I've tried every combination i can think of, or that I've found in 3 or so hours of research on Google to try to prevent Bundler from install the test & dev gems on the server.    Any help appreciated.

Last edited by IdahoEv (2011-01-18 12:53:41)