Lesstep
GitHub Actions · Ubuntu 26.04 · Checked November 4, 2026

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:

SeriesBuilt for ubuntu-26.04
4.04.0.5 to 4.0.9
3.43.4.9 to 3.4.12
3.33.3.11 to 3.3.13
3.23.2.11
3.1 and older3.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

Other 26.04 failures

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 · 日本語