You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
input bundler: 2.7.2 didn't run bundle lock with the correct version #845
I verified it reproduces with the latest version with - uses: ruby/setup-ruby@v1 (see Versioning policy)
I tried to reproduce the issue locally by following the workflow steps (including all commands done by ruby/setup-ruby, except for Downloading Ruby & Extracting Ruby),
and it did not reproduce locally (if it does reproduce locally, it's not a ruby/setup-ruby issue)
Are you running on a GitHub-hosted runner or a self-hosted runner?
GitHub-hosted runner
Link to the failed workflow job (must be a public workflow job, so the necessary information is available)
I think it would make sense to include BUNDLER_VERSION in envOptions that the bundle lock command uses. I haven't looked if it makes sense in all scenarios but at least when bundler: is set to a specific version.
For the record I'm able to workaround this issue like this (removing the generated lockfile, running bundle install with BUNDLER_VERSION set) sinatra/sinatra@c694c06
I see, thanks for the report.
I think this is only a problem when there is no checked-in Gemfile.lock, as that would pick the right version due to Bundler auto-switching.
Activity
dentarg commentedon Dec 27, 2025
Looks like
BUNDLER_VERSION(the env variable) is only set for Bundler 1setup-ruby/bundler.js
Lines 165 to 170 in ae195bb
I think it would make sense to include
BUNDLER_VERSIONinenvOptionsthat thebundle lockcommand uses. I haven't looked if it makes sense in all scenarios but at least whenbundler:is set to a specific version.setup-ruby/bundler.js
Line 184 in ae195bb
dentarg commentedon Dec 27, 2025
For the record I'm able to workaround this issue like this (removing the generated lockfile, running bundle install with
BUNDLER_VERSIONset) sinatra/sinatra@c694c06eregon commentedon Dec 31, 2025
I see, thanks for the report.
I think this is only a problem when there is no checked-in Gemfile.lock, as that would pick the right version due to Bundler auto-switching.
Set BUNDLER_VERSION whenever we know which version to use
eregon commentedon Dec 31, 2025
Repro'd in https://github.com/ruby/setup-ruby/actions/runs/20625380512/job/59234986980
Set BUNDLER_VERSION whenever we know which version to use
Set BUNDLER_VERSION whenever we know which version to use
Set BUNDLER_VERSION whenever we know which version to use