Skip to content

Fix Ruby 4.0 CI failure on ubuntu-latest#3940

Open
st0012 wants to merge 1 commit intomainfrom
fix-ruby-4.0-ci-rubygems-update
Open

Fix Ruby 4.0 CI failure on ubuntu-latest#3940
st0012 wants to merge 1 commit intomainfrom
fix-ruby-4.0-ci-rubygems-update

Conversation

@st0012
Copy link
Member

@st0012 st0012 commented Feb 5, 2026

Motivation

The ubuntu-latest runner image (20260126.10+) ships a pre-installed Ruby 4.0.1 that causes native extension builds and bundler operations to fail. The chmod +t workaround from ruby/rubygems#9284 is insufficient — the pre-installed Ruby has deeper issues beyond the sticky bit.

Implementation

  • Remove the pre-installed Ruby 4.0 from /opt/hostedtoolcache before setup-ruby runs, forcing it to download a working build from ruby-builder
  • Update RubyGems to latest

Automated Tests

Existing CI matrix covers this — the Ruby 4.0 on ubuntu-latest job now passes.

@st0012 st0012 force-pushed the fix-ruby-4.0-ci-rubygems-update branch from 34d4dd7 to 6b2a170 Compare February 5, 2026 23:43
@st0012 st0012 changed the title Update RubyGems in CI to fix Ruby 4.0 native extension builds Fix Ruby 4.0 CI failure on ubuntu-latest Feb 6, 2026
@st0012 st0012 force-pushed the fix-ruby-4.0-ci-rubygems-update branch 2 times, most recently from 4d70bb3 to 28e0307 Compare February 6, 2026 11:03
@st0012 st0012 self-assigned this Feb 6, 2026
@st0012 st0012 added the chore Chore task label Feb 6, 2026
@st0012 st0012 force-pushed the fix-ruby-4.0-ci-rubygems-update branch from 28e0307 to 15579ba Compare February 6, 2026 15:15
The ubuntu-latest runner image (20260126.10+) ships a pre-installed
Ruby 4.0.1 that causes native extension builds and bundler operations
to fail (ruby/rubygems#9284). Remove it from the tool cache to force
setup-ruby to download a working build from ruby-builder. Also update
RubyGems to latest.
@st0012 st0012 force-pushed the fix-ruby-4.0-ci-rubygems-update branch from 15579ba to efc1346 Compare February 6, 2026 15:49
@st0012 st0012 marked this pull request as ready for review February 6, 2026 16:02
@st0012 st0012 requested a review from a team as a code owner February 6, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Chore task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant