setup-ruby: "Unavailable version 3.4.2 for ruby on ubuntu-26.04"
ubuntu-latest is moving from Ubuntu 24.04 to 26.04 between October 19 and November 19, 2026 (what else changes). ruby/setup-ruby downloads a prebuilt Ruby from ruby/ruby-builder, one build for each Ruby version and runner image. For a new image it builds only the latest patch release of each series at that time, and the releases that come after (setup-ruby #943). So a version that installs on 24.04, such as 3.4.2, has no build for 26.04, and the job stops at the Ruby step.
The message
Since October 19, ruby/setup-ruby@v1 says what to use instead (setup-ruby #949):
Unavailable version 3.4.2 for ruby on ubuntu-26.04
Only the latest patch release of each series is built for newer runner images.
ruby-3.4.11 is available on ubuntu-26.04: use ruby-version: '3.4.11', or '3.4' to always use the latest 3.4.x release.
Older runs show only the first line and "You can request it at https://github.com/ruby/setup-ruby/issues". The version can come from ruby-version: in the workflow or from .ruby-version, which setup-ruby reads when ruby-version is not set (the log says "Using 3.4.2 as input from file .ruby-version").
What is built for ubuntu-26.04
We asked ruby-builder for each x64 build on November 4, 2026, the same download setup-ruby makes:
| Series | Built for ubuntu-26.04 |
|---|---|
| 4.0 | 4.0.5 to 4.0.9 |
| 3.4 | 3.4.9 to 3.4.12 |
| 3.3 | 3.3.11 to 3.3.13 |
| 3.2 | 3.2.11 |
| 3.1 and older | 3.1.7, 3.0.7, 2.7.8, 2.6.10, 2.5.9, 2.4.10 |
Earlier patches are not built, for example 4.0.4, 3.4.8, 3.3.10, 3.2.10, 3.1.4 and 2.7.7. Ruby 3.1 and older had no 26.04 build at all until October 31: they failed to build with GCC 15, and ruby-builder added flags for it (setup-ruby #954). The setup-ruby README still says 26.04 has only 3.2 and newer; the builds in the table are there. Projects that moved their Ruby 2.7 to 3.1 jobs to ubuntu-24.04 in late October, such as rack #2545 and rubocop #16210, can stay there or come back on the last patch.
Fix 1: ask for the series, or a built patch
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true
'3.4' takes the latest 3.4.x built for the image. Keep the quotes: unquoted, 3.0 reaches the action as 3 (the setup-ruby README points to actions/runner #849). If the version is in .ruby-version, change the file to a built patch such as 3.4.12, or set ruby-version in the step, which then wins over the file. Jekyll sites made from a template often carry an old patch there; al-folio #3706 is one report.
If the Gemfile pins the exact patch, for example ruby "3.4.2", Bundler then stops with "Your Ruby version is 3.4.12, but your Gemfile specified 3.4.2". Change it with the other pin, or loosen it to ruby "~> 3.4.0".
Fix 2: keep that Ruby on 24.04
When the exact patch matters, run that entry on the old image, which still has the older builds:
strategy:
matrix:
include:
- ruby: '3.4'
os: ubuntu-latest
- ruby: '3.3.6'
os: ubuntu-24.04
runs-on: ${{ matrix.os }}
It holds until GitHub retires the 24.04 image. Python has the same pattern on 26.04: setup-python's "was not found" error.
Telling it apart
- The job fails in the setup-ruby step, before
bundle install, with "Unavailable version" and the image name. - Look at "Set up job": the Runner Image group says
ubuntu-26.04orubuntu-24.04. Until November 19 a re-run can land on 24.04 and pass, so a green re-run proves nothing. - If Ruby installs and a gem then fails to load with "cannot open shared object file", a cache from 24.04 is the likelier cause: "cannot open shared object file" on Ubuntu 26.04.
Other 26.04 failures
- setup-beam's "not found in version list" on Ubuntu 26.04: the Erlang/OTP build list for 26.04 starts at OTP 26.0, so OTP 24 and 25 stop at setup, and a setup-beam older than v1.24.1 fails for every OTP.
- C and C++ builds that fail with GCC 15 on Ubuntu 26.04: the default gcc goes from 13 to 15, so C is compiled as C23, six old warnings are errors, and C++ headers no longer pull in
<cstdint>for you. - "cannot open shared object file" on Ubuntu 26.04: libxml2 is
libxml2.so.16and ICU is 78, so a cache saved on 24.04, or a binary built for it, cannot findlibxml2.so.2orlibicudata.so.74. - apt on Ubuntu 26.04: renamed and removed packages.
- Playwright on Ubuntu 26.04: Playwright 1.50 to 1.60 says it "does not support chromium on ubuntu26.04-x64".
- "client version ... is too old" on Ubuntu 26.04: Docker 29 refuses clients below API 1.40, so older Testcontainers fails with "Could not find a valid Docker environment".
- "coreutils: unknown program": most core tools are uutils.
See failed jobs from IntelliJ IDEA
Pipeline Inbox for GitHub Actions Workflows, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the runs of all your repositories in an IDE tool window, with their jobs and steps, and your current branch's runs are in the status bar. Reading is free; re-running failed jobs, cancelling, running workflows and reviewing deployments are Pro (US$1.50 a month, with a 30-day trial).
Get it on JetBrains Marketplace
GitHub and GitHub Actions are trademarks of GitHub, Inc.; Ubuntu is a trademark of Canonical Ltd.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with, sponsored or endorsed by GitHub, Inc., Canonical, the Ruby projects or JetBrains.
More: "The ubuntu-latest label will migrate to Ubuntu 26" · setup-python's "was not found" error · "cannot open shared object file" on Ubuntu 26.04 · GitHub Actions plugins for IntelliJ IDEA compared · 日本語