GeezerVison is showing github.com — Print the final content of the Gemfile.lock · Issue #783 · ruby/setup-ruby
Print the final content of the Gemfile.lock #783DescriptionFeature request: Print the final content of the Gemfile.lock.
From a diagnostics point of view, it is very useful to see exactly what versions of gems were installed from run to run.
In our particular case, we had a corrupted cache which caused the list of gems to be rebuilt, and the new run failed our CI. While I could see the newly installed gems as they were installed, when I went to the previous green run, I couldn't see what was installed.
The request is simply, at the end of installation, print the Gemfile.lock into the log in a collapsed section.
I am willing to make a PR for this feature but wanted to discuss first. Activityeregon commented on Jul 24, 2025 Fryguy commented on Jul 24, 2025 ContributorAuthor More actions There used to be a setting, and then they removed it in ruby/rubygems#6804 to never print it. The workaround is to use --verbose or DEBUG-1 env var, but IMO that swings too far in the other direction as that also shows the HTTP traffic. eregon commented on Jul 24, 2025 I tried --verbose/DEBUG=1 and yeah that looks too messy:
$ bundle install --verbose
Running `bundle install --verbose` with bundler 2.6.4
Found no changes, using resolution from the lockfile
Using bundler 2.6.4
0: bundler (2.6.4) from /home/eregon/.rubies/ruby-3.4.2/lib/ruby/gems/3.4.0/specifications/bundler-2.6.4.gemspec
Using json 2.2.0
0: json (2.2.0) from /home/eregon/tmp/bundler-gemfile/vendor/bundle/ruby/3.4.0/specifications/json-2.2.0.gemspec
Using path 2.1.0
0: path (2.1.0) from /home/eregon/tmp/bundler-gemfile/vendor/bundle/ruby/3.4.0/specifications/path-2.1.0.gemspec
Bundle complete! 2 Gemfile dependencies, 3 gems now installed.
Bundled gems are installed into `./vendor/bundle`
$ bundle show
Gems included by the bundle:
* bundler (2.6.4)
* json (2.2.0)
* path (2.1.0)
$ cat Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
json (2.2.0)
path (2.1.0)
PLATFORMS
ruby
x86_64-linux
DEPENDENCIES
json (= 2.2.0)
path
BUNDLED WITH
2.6.4
bundle show is nicest, but I'm concerned it would increase the runtime of every job, especially on non-CRuby and for Gemfile with many gems.
Maybe you could file a Bundler feature for a bundle install flag or env var to print the same as bundle show?
In the meanwhile, I agree printing Gemfile.lock in a collapsed section is the best, could you make a PR? Fryguy commented on Jul 24, 2025 ContributorAuthor More actions added 2 commits that reference this issue on Jul 24, 2025This issue will close once commit 23ee4ef is merged into the 'master' branch.23ee4ef This issue will close once commit 0f7db01 is merged into the 'master' branch.0f7db01 added a commit that references this issue on Jul 25, 2025This issue will close once commit 7a77259 is merged into the 'master' branch.7a77259 added a commit that references this issue on Jul 25, 2025This issue will close once commit e8621f0 is merged into the 'master' branch.e8621f0 added a commit that references this issue on Jul 25, 2025This issue will close once commit 6284f69 is merged into the 'master' branch.6284f69 added a commit that references this issue on Jul 26, 2025This issue will close once commit ba9e71c is merged into the 'master' branch.ba9e71c
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|