The role of the Gemfile.lock file in the Rails framework
When we want the referenced packages in the Application to remain the same, just keep Gemfile.lock unchanged. This way, even when we migrate the Application to another environment, we can keep the code and its functionality consistent. And when we develop C++ or Java applications, it is not so convenient, especially package references seem to be out of control.
The following is an excerpt of the English description of Gemfile.lock:
- THE GEMFILE.LOCK
-
- When you run bundle install, Bundler will persist the full names and versions of all gems that you used (including dependencies of the gems specified in the Gemfile(5)) into a file called Gemfile.lock.
-
- Bundler uses this file in all subsequent calls to bundle install, which guarantees that you always use the same exact code, even as your application moves across machines.
-
- Because of the way dependency resolution works, even a seemingly small change (for instance, an update to a point-release of a dependency of a gem in your Gemfile(5)) can result in radically different gems being needed to satisfy all dependencies.
-
- As a result, you SHOULD check your Gemfile.lock into version control. If you do not, every machine that checks out your repository (including your production server) will resolve all dependencies again, which will result in different versions of third-party code being used if any of the gems in the Gemfile(5) or any of their dependencies have been updated.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
TextMate bundle 학습 노트 생 성 모드대상: textMate 의 모드 기능 을 사용 하여 기 존의 자바 bundle 을 확장 하여 template 를 만 들 고 class 소스 파일 을 만 드 는 데 편리 합 니 다. Command (s) 여 기 는 구...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.