lock-gemfile is a command-line tool that updates your Gemfile with locked versions from Gemfile.lock. It automatically rewrites gem declarations in your Gemfile to pin them to the exact versions currently in use, helping you create reproducible environments and avoid unexpected dependency updates. The gem uses the Ruby parser to intelligently rewrite your Gemfile while preserving formatting and comments, making it easy to transition from flexible version constraints to locked versions when needed.
gem install lock-gemfile Run this gem instantly in your browser without any installation:
Open in RunRuby.dev →Direct dependencies and their transitive dependencies
| Name | Level | Type | Version | Dependencies |
|---|---|---|---|---|
| bundler | Direct | runtime | >= 1.0 | - |
| parser | Direct | runtime | >= 3.0 | +2 |
| thor | Direct | runtime | >= 1.0 | - |
| ast | Transitive | runtime | v2.4.3 | - |
| racc | Transitive | runtime | v1.8.1 | - |