I'm currently trying to better understand dependency management in the Ruby ecosystem.
I understand what gems are and why we need a Gemfile.lock
.
In the Gemfile.lock
there is an entry that holds the bundler version that the gems are bundled with.
BUNDLED WITH
<version>
I would like to better understand why the bundler version is relevant. The Gemfile.lock already contains the versions of all gems that are relevant for my application. What role does the version of the bundler still play?
What could potentially go wrong if two developers work on a project with different Bundler versions? Can someone give me a concrete example?
I have already read the bundler documentation, but could not come to any conclusions.
Bundler is also a gem, so it'll also can have potentially breaking changes in it's functionality.
Different Bundler versions may resolve dependencies differently, leading to conflicting gem versions. For example: Bundler v1.0.0 can resolve some version of gem to 2.1.1 while newest version of Bundler can have improved alghorithm and it'll resolve it to 2.1.8 if possible or even newer and it can do it faster.
If the project is bundled with old version, newer versions of Bundle potentialy can introduce newer syntax for Gemfile.lock
.
Some versions introduce new settings or default behaviors, affecting how gems are installed.