Skip to content

Commit a434867

Browse files
committed
ci: Pin Bundler to 4.0.6 in RuboCop workflow as workaround for ruby/rubygems#9536
The RuboCop workflow started failing on master at 2026-05-12T01:01 UTC with: Could not find compatible versions against the multi-gemspec git source `rails/rails` whose top-level gem is in a filtered-out group when `BUNDLE_ONLY=rubocop bundle install` runs under Ruby 4.0.4 (Bundler 4.0.11). The regression is tracked in ruby/rubygems#9536; Bundler 4.0.5 and 4.0.6 succeed while 4.0.7+ fail. Pin Bundler explicitly so the workflow keeps rolling on `ruby-version: "4.0"`: - set BUNDLER_VERSION=4.0.6 at the job level so every bundle invocation resolves to that version - gem install bundler -v 4.0.6 so the version is actually present (the ruby-builder tarball ships only one Bundler, and current 4.0.x tarballs no longer ship 4.0.6) Drop both once Bundler ships a fix for ruby/rubygems#9536.
1 parent 959e88b commit a434867

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/rubocop.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,21 @@ jobs:
1010
build:
1111

1212
runs-on: ubuntu-latest
13+
env:
14+
BUNDLER_VERSION: 4.0.6
1315

1416
steps:
1517
- uses: actions/checkout@v6
1618
- name: Set up Ruby 4.0
1719
uses: ruby/setup-ruby@v1
1820
with:
1921
ruby-version: "4.0"
22+
- name: Pin Bundler to 4.0.6 (workaround for ruby/rubygems#9536)
23+
run: |
24+
gem install bundler -v 4.0.6
25+
ruby --version
26+
gem --version
27+
bundle --version
2028
- name: Build and run RuboCop
2129
run: |
2230
BUNDLE_ONLY=rubocop bundle install --jobs 4 --retry 3

0 commit comments

Comments
 (0)