Hi,
Is there a way to bundle install only specified groups? For example: bundle install --only deploy
Here's my use case:
I'm setting up Jenkins CI server to build Rails app using Capistrano. Before Jenkins can run `cap deploy`, it needs the gems required by `config/deploy.rb` to be installed on CI server. For simple use case, it only needs `capistrano` gem. But normally, we will require a few recipes from other gems e.g. delayed_job/recipes etc.
This is my current workaround:
# Gemfile
...
group :development do
..
end
group : test do
..
end
group :deploy do
gem 'capistrano'
gem 'capistrano-helpers'
gem 'capistrano-ssh-helpers'
gem 'delayed_job'
end
# Command to install gems on CI server:
bundle install --deployment --without default development test # this will install :deploy group only
The reason I don't want to run `bundle install` is because I don't want to install all default gems on CI server, especially those with native extensions. Any suggestion or better workaround?
--
Huiming