Skip to content


`bundle clean` is not aware of `BUNDLE_WITHOUT` groups #2093

richardkmichael opened this Issue · 2 comments

3 participants


I am trying to run bundle clean on a production server (where gem groups development and test have been omitted), and it fails expecting to find development group gems.

Capistrano is in my development group, it has a dependency on highline. I removed an unrelated gem, re-ran bundle install, pushed to production and want to now want to run bundle clean on the production server to uninstall the removed gem. bundle clean stops because it cannot find highline. However, the lack of highline is expected because it's a development gem and should not be on the server (in production).

Have I misunderstood the usage of bundle clean?

A gist with my Gemfile, Gemfile.lock.

deployer@ubuntu:~/apps/testapp/current$ bundle clean 
Could not find highline-1.6.14 in any of the sources

deployer@ubuntu:~/apps/testapp/current$ bundle --version
Bundler version 1.2.0

deployer@ubuntu:~/apps/testapp/current$ cat .bundle/config 
BUNDLE_PATH: /home/deployer/apps/testapp/shared/bundle
BUNDLE_WITHOUT: development:test
@hone hone was assigned
Bundler member

thanks for the bug report. This is an unintentional behaviour change in 1.2.0. I'm currently looking into a fix.

Update: Let me clarify, the fact that bundle clean breaks when used with BUNDLE_WITHOUT is a bug.

@hone hone closed this in 4e7bd59
@hone hone added a commit that referenced this issue
@hone hone Fixes #2093. Don't blow up when using BUNDLE_WITHOUT groups
This adds a way for SpecSet#materialize to fetch info from a rubygems
server when the spec is missing. Note, the gemspec.rz fetched does not
contain all the info like executables of the gem.
@hone hone reopened this
@evanphx evanphx was assigned
Bundler member

This is fixed in 1.2.1.

@hone hone closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.