Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are you supposed to include Gemfile.lock in a published gem?

If you publish the source for a ruby gem to github.com, is the Gemfile.lock supposed to included?

like image 356
dan Avatar asked Oct 27 '11 17:10

dan


2 Answers

This guy has strong opinions.

http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/

Namely:

  • You should include your Gemfile.lock in version control if you're developing an application
  • You should not include your Gemfile.lock in version control if you're developing a gem

I'm not sure if I'm convinced yet. I think that using the Gemfile.lock in my version control is good. But I think that it is too much for that file to be included for others use. The gemfile is enough for an install for others. I think Gemfile.lock is for development, not deployment, contrary to the previously expressed opinion.

like image 102
Ryanmt Avatar answered Sep 29 '22 20:09

Ryanmt


No, the Gemfile.lock file is an aid for deployment, not for development.

It is used to recreate an exact replica of your environment on another systems, something that is not (usually) required for development.

like image 40
gioele Avatar answered Sep 29 '22 19:09

gioele