I read this quote from this blog:
In general, a gem's Gemfile should contain the Rubygems source and a single gemspec line. Do not check your Gemfile.lock into version control, since it enforces precision that does not exist in the gem command, which is used to install gems in practice. Even if the precision could be enforced, you wouldn't want it, since it would prevent people from using your library with versions of its dependencies that are different from the ones you used to develop the gem.
I don't get it. Why would checking in a gemfile.lock prevent people from using my gem with versions of the gem's dependenciess that are different from the ones I used in development? Isn't that the whole point of a Gemfile.lock?
When I run bundle install
, doesn't it look at the Gmefile.lock to determine which versions of the gems to install?