I have remotes set up on Heroku for production and staging.
On staging I have set the app's envs to include:
RACK_ENV=staging
RAILS_ENV=staging
I would like to be able to specify a staging
group in my Gemfile
in the same way I can currently use production
, test
or assets
:
group :staging do
gem "example", "~> 0.9"
end
I understand how to add custom groups. From my application.rb
:
groups = {
assets: %w(development test)
}
Bundler.require(:security, :model, :view, *Rails.groups(groups))
But how do I add a group that is only loaded in staging?
I've tried without success:
groups = {
assets: %w(development test),
staging: %(staging)
}
Bundler.require(:security, :model, :view, *Rails.groups(groups))