2

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?

Jwan622
  • 11,015
  • 21
  • 88
  • 181
  • I'm struggling with the same issues myself, did you ever figure this out? – Yaron Idan May 22 '18 at 14:10
  • Nope, nobody answered and stack overflow hates it when you repost. Watch what happens when I do it... – Jwan622 May 22 '18 at 18:54
  • Yeah, I get you. I think SO also tries to stir away from these types of questions and concentrates on stuff that can be answered as code. Perhaps this question fits more in Reddit, Quora or some Ruby centric forum. – Yaron Idan May 23 '18 at 17:12

0 Answers0