Can't undo "--without" #1259

Closed
ccutrer opened this Issue Jun 20, 2011 · 2 comments

Projects

None yet

3 participants

@ccutrer
ccutrer commented Jun 20, 2011

I'm working on a project that can use sqlite, mysql, or postgres. I initially installed on sqlite, doing "bundle install --without mysql postgres". Then I switched to postgres, and "bundle install --without mysql". Now I need to do some testing with mysql, but doing a plain "bundle install" remembers the previous --without, and "bundle install --without ''" (without nothing) gives an error. My first workaround was to do "bundle install --without sqlite", but that's not right because sqlite is still needed for things besides the main db. I finally figured out that I could delete .bundle/config, but that was non-obvious. Either "bundle install --without ''" should work, or something like "bundle install --with mysql" should be added to override the cached without.

@indirect
Member

At very least, --without '' should clear the without groups. Thanks for reporting this.

On Jun 20, 2011, at 10:24 AM, ccutrer reply@reply.github.com wrote:

I'm working on a project that can use sqlite, mysql, or postgres. I initially installed on sqlite, doing "bundle install --without mysql postgres". Then I switched to postgres, and "bundle install --without mysql". Now I need to do some testing with mysql, but doing a plain "bundle install" remembers the previous --without, and "bundle install --without ''" (without nothing) gives an error. My first workaround was to do "bundle install --without sqlite", but that's not right because sqlite is still needed for things besides the main db. I finally figured out that I could delete .bundle/config, but that was non-obvious. Either "bundle install --without ''" should work, or something like "bundle install --with mysql" should be added to override the cached without.

Reply to this email directly or view it on GitHub:
#1259

@indirect indirect was assigned Aug 17, 2011
@petervandenabeele

This costed me an hour to figure out. Would be nice to get this fixed :-)

Why is --without env1 env2 ... cached anyway ?

E.g. gem install --no-rdoc is just doing no rdoc for that one time,
but is not caching that behavior to the config file without warning the user

E.g. rvm use ruby-1.9.2@gemspec is doing it for one time, unless --default
is given, but not caching that behavior without warning

Also capistrano always calls with --without development test by default,
repeating that every time.

I suggest to simply not cache the --without behavior when supplied as
a command line argument.

@indirect indirect added a commit that closed this issue Sep 18, 2011
@indirect indirect Allow clearing --without groups
fixes #1259
83dbe36
@indirect indirect closed this in 83dbe36 Sep 18, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment