Understanding the Gemfile.lock file

After running the bundle install command, ‘Gemfile.lock‘ is created in the working directory. What do the directives inside that file mean?

For example, let’s take the following file:

PATH
  remote: .
  specs:
    gem_one (0.0.1)

GEM
  remote: http://example.org/
  specs:
    gem_two (0.0.2)
    gem_three (0.0.3)
      gem_four (0.0.4)

PLATFORMS
  platform

DEPENDENCIES
  gem_two
  gem_one!

What do ‘PATH‘, ‘GEM‘, ‘PLATFORMS‘ and ‘DEPENDENCIES‘ describe? Are all of them required?

What should contain the ‘remote‘ and ‘specs‘ subdirectives?

What does the exclamation mark after the gem name in the ‘DEPENDENCIES‘ group mean?

7 Answers
7

Leave a Comment