My machine is running bundler 1.10.6. When I run bundle install, the BUNDLED WITH block is removed from my Gemfile.lock.
BUNDLED WITH
1.10.5
If I run git checkout -- Gemfile.lock
, it doesn't revert the change. This is a problem because it means I can't get a clear working HEAD so I can't rebase, cherry-pick or run other important git commands.
I understand why bundler usually updates this section of the Gemfile.lock to log the bundler version, but why would it be removing the section?
You can read more about the BUNDLED WITH section at the bundler blog.
A: Yes, you should commit it. The presence of a `Gemfile. lock` in a gem's repository ensures that a fresh checkout of the repository uses the exact same set of dependencies every time.
The Gemfile is where you specify which gems you want to use, and lets you specify which versions. The Gemfile. lock file is where Bundler records the exact versions that were installed. This way, when the same library/project is loaded on another machine, running bundle install will look at the Gemfile.
Gemfile. lock is automatically generated when you run bundle install or bundle update . It should never be edited manually.
All you need to do to is to upgrade the "bundler" gem (something that is also recommended)-
Simply run: gem update bundler
This would work for most people.
Also, try: gem update rubygems-bundler
in case that comes from a rubygems issue (which was resolved)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With