Search code examples
rubyrubygemsbundler

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?


Solution

  • 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.