From a434867a6b0d2b5b4034f6475f275b7a95a5c977 Mon Sep 17 00:00:00 2001 From: Yasuo Honda Date: Tue, 12 May 2026 22:37:01 +0900 Subject: [PATCH] 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. --- .github/workflows/rubocop.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index 40903c2b..43d7818e 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -10,6 +10,8 @@ jobs: build: runs-on: ubuntu-latest + env: + BUNDLER_VERSION: 4.0.6 steps: - uses: actions/checkout@v6 @@ -17,6 +19,12 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: "4.0" + - name: Pin Bundler to 4.0.6 (workaround for ruby/rubygems#9536) + run: | + gem install bundler -v 4.0.6 + ruby --version + gem --version + bundle --version - name: Build and run RuboCop run: | BUNDLE_ONLY=rubocop bundle install --jobs 4 --retry 3