I am trying to use different Gemfile in one of my projects. It works via adding `--gemfile=Gemfile.mingw` to every command (that is tiresome) and via setting BUNDLE_GEMFILE env var (that is not an option because it affects all the projects).
So I thought the best way would be to config alternative gemfile name locally:
bundle config --local gemfile Gemfile.mingw
`bundle config` shows this option was saved. But seems that bundle install/update does not obey it, still trying to install gems from default Gemfile.
Tested with ruby 1.9.3, bundler 1.1.5 and 1.2.0.rc2, Win7 (mingw) and Ubuntu.
Also I have not found many mentions of such an issue on the internet so I could be doing something absolutely wrong? Also posted this on http://stackoverflow.com/questions/12088717/having-different-bundler-gemfiles-for-different-platforms-does-bundler-obey-con
Many thanks.
Unfortunately, by the time Bundler loads the config file, it is too late. You need to set the Gemfile usingBUNDLE_GEMFILE=Gemfile.sj bundle install, or usingbundle install --gemfile Gemfile.sj.
However, I'm not sure that this would be a useful solution anyway, as surely each Gemfile will install to the same Gemfile.lock.