My organization has a number of in-house gems that are used in automated testing, but are not required for a production deployment. I am trying to use Bundler and so in my Gemfile I've wrapped those gems in:
group :test, :development do
gem 'dashboard_summary'
end
However, when I run:
$ bundle install --without staging development test
I still get
Could not find gem 'dashboard_summary (>= 0) ruby' in the gems available on this machine.
I'm trying to understand why Bundler isn't ignoring that gem when I've told it to.
You didn't define any group that includes staging, development and test. Your group only had test and development.
Bundler is trying to ignore a group which has all three name in it, so you can add staging to
or you can use
I'm not sure why you have
staging
in there? but this should workYou could also set the config environment variable documented in
BUNDLE_WITHOUT
in bundle config.You could use
This would not load the gem on startup and you would have to require it when you wanted to use the gem. This may help if you need to keep
dashboard_summary
in your Gemfile because of dependencies, but save the time it takes to load and not get the error you are getting now. It's at least something to try.This is expected behaviour. From the docs:
Whilst an up to date
Gemfile.lock
might suggest that the dependencies don’t need to be resolved again, it looks like all gems are downloaded even in this case.