Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Bundler 2 does not auto-switch versions when BUNDLE_GEMFILE is set via .bundle/config #7445
Bundler 2 is supposed to detect if a project was bundled with v1 based on the
This is not working correctly if:
Note: This is working correctly if one of the following is true:
Running bundler 2.x on a project that was bundled with 1.x would be that
Example repo to reproduce
A repository that demonstrates this behavior is located here: https://github.com/jtokoph/bundler2bug
The readme has steps to reproduce.
I think, this is actually a bug in bundler, and it should get fixed by #6713, which I just rebased.
It would be great if you could try it, but it's kind of complicated due to the following explanation. The changes in that PR led to a single test failure in bundler's test suite when I implemented it. So I figured it could be considered backwards incompatible, so I placed the fix under an environment variable flag. So, if you wanted to try whether the fix works for you, you would have to:
I realize that this is a cumbersome way to try it, and I'm open to consider the spec being broken as a bug in our specs, and thus enable this fix by default without the need for any environment variable being set.
Let me know if you're able to follow these steps.