Use Bundler
bundle init
bundle install
First step generates a basic Gemfile
Second step generates a Gemfile.lock
I use the Gemfile.lock
file for: snyk
security code audit, meaning I monitor dependencies on GitHub, see my repository: docker-cheatset.