rubygems / bundler-features

Bundler feature requests and discussion
28 stars 8 forks source link

Remember alternative Gemfile #86

Closed ineiti closed 8 years ago

ineiti commented 9 years ago

When I use an alternative Gemfile like

bundle install --gemfile Gemfile.dev

I'd like the Gemfile.dev.lock be used in any require 'bundler/setup'

Usecase:

for my development, I like having path: in the Gemfile, but not for deployment. So I made a second Gemfile and I am trying to use that one, but it always takes the gems from Gemfile.lock

segiddins commented 9 years ago

You can use the BUNDLER_GEMFILE environment variable to this effect

ineiti commented 9 years ago

OK - that might work. But I still it would be more logical to continue the way of https://github.com/bundler/bundler/pull/3320 and also use the config:gemfile for bundler/setup.

ineiti commented 9 years ago

Now a step further. If I do first

bundle config --local gemfile Gemfile.dev

everything works as expected. But one might wonder whether the --gemfile option in bundle install shouldn't set that configuration by itself.

asymmetric commented 9 years ago

@ineiti, according to this issue:

In Bundler 2.0, flags passed to commands will no longer be remembered, and instead should be set using bundle config if they should apply to every run

coilysiren commented 8 years ago

This issue was moved to bundler/bundler#4541