Skip to content

ci: bump Ruby from 2.7.8 to 3.2#87

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/update-ci-ruby-version
Draft

ci: bump Ruby from 2.7.8 to 3.2#87
Copilot wants to merge 2 commits intomainfrom
copilot/update-ci-ruby-version

Conversation

Copy link
Copy Markdown

Copilot AI commented May 9, 2026

nokogiri >= 1.19.3 requires Ruby >= 3.2, causing bundle install to fail in CI before any tests ran. The workflow was pinned to the EOL 2.7.8.

Changes

  • .github/workflows/ci.yml — set ruby-version: 3.2 in both lint and test jobs
  • .ruby-version — aligned to 3.2 to match CI
Original prompt

The CI job is failing on pull request #86 in repository cliffe/BreakEscape due to a Ruby version mismatch during bundle install.

Observed failure from job 75163068190:

  • nokogiri-1.19.3-x86_64-linux requires ruby version < 4.1.dev, >= 3.2
  • Current workflow uses Ruby 2.7.8
  • Failure occurs before tests run, during Bundler install

Relevant files and references:

Required fix:

  1. Update .github/workflows/ci.yml so both the lint and test jobs use a Ruby version compatible with the resolved gem set, preferably Ruby 3.2.
  2. Keep the existing workflow structure intact unless another minimal change is required.
  3. If needed, align any Ruby version declarations in the repo so CI and local development are consistent, but prioritize the CI fix.
  4. Open a pull request with the fix targeting the repository branch associated with PR Add spacebar hint to dialogue skip button #86 if appropriate.

Success criteria:

  • bundle install no longer fails due to Ruby version incompatibility.
  • CI workflow uses a supported Ruby version for both jobs.
  • Changes are minimal and focused on fixing the failing CI job.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Please find a solution for failing job 75163068190. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.

Assistant: The failure is caused by a Ruby version mismatch in CI.

Root cause

The job log shows Bundler failing while installing nokogiri:

  • nokogiri-1.19.3-x86_64-linux requires ruby version < 4.1.dev, >= 3.2
  • CI is using Ruby 2.7.8

This comes from the workflow file:

Your lockfile is already on a newer dependency set that expects a newer Ruby/runtime stack:

  • Rails resolved to 7.1.4.2
  • rails-html-sanitizer depends on newer nokogiri
  • Gemfile.lock includes gems from a modern Ruby ecosystem that no longer supports 2.7 well
  • See Gemfile.lock, Gemfile.lock, and Gemfile.lock

Solution

Update the CI workflow to use a supported Ruby version, preferably 3.2 or newer.

Recommended change

# .github/workflows/ci.yml
- name: Set up Ruby
  uses: ruby/setup-ruby@v1
  env:
    BUNDLE_BUILD__SQLITE3: "--enable-system-libraries"
  with:
    ruby-version: 3.2
    bundler-cache: true

Apply that in both lint and test.

Suggested patch

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b80b1ac..XXXXXXX 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -20,7 +20,7 @@ jobs:
         env:
           BUNDLE_BUILD__SQLITE3: "--enable-system-libraries"
         with:
-          ruby-version: 2.7.8
+          ruby-version: 3.2
           bundler-cache: true
@@ -41,7 +41,7 @@ jobs:
         env:
           BUNDLE_BUILD__SQLITE3: "--enable-system-libraries"
         with:
-          ruby-version: 2.7.8
+          ruby-version: 3.2
           bundler-cache: true

Why this is the right fix

This is failing before tests even run, during bundle install. The error is not in app code; it is in the job definition. The workflow is pinned to an obsolete Ruby version that is incompatible with the resolved gem set.

If you want to make the repo more consistent, also consider updating the app’s declared Ruby version wherever it is documented or configured so local development matches CI.

User: Fix it

Assistant: I’ve started the fix by opening a PR workflow to update the CI Ruby version so the failing job can install dependencies successfully.

This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Update CI to use Ruby 3.2 for compatibility ci: bump Ruby from 2.7.8 to 3.2 May 9, 2026
Copilot AI requested a review from cliffe May 9, 2026 21:43
Copilot finished work on behalf of cliffe May 9, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants