Understanding the Gemfile.lock file

后端 未结 7 700
南笙
南笙 2020-12-22 17:00

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

F

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-22 17:28

    It seems no clear document talking on the Gemfile.lock format. Maybe it's because Gemfile.lock is just used by bundle internally.

    However, since Gemfile.lock is a snapshot of Gemfile, which means all its information should come from Gemfile (or from default value if not specified in Gemfile).

    For GEM, it lists all the dependencies you introduce directly or indirectly in the Gemfile. remote under GEM tells where to get the gems, which is specified by source in Gemfile.

    If a gem is not fetch from remote, PATH tells the location to find it. PATH's info comes from path in Gemfile when you declare a dependency.

    And PLATFORM is from here.

    For DEPENDENCIES, it's the snapshot of dependencies resolved by bundle.

提交回复
热议问题