Skip to content

Upgrade Rails to 8.0, dual-boot with 8.1 - #48

Merged
etagwerker merged 10 commits into
mainfrom
upgrade-rails-8.1-dual-boot
Nov 22, 2026
Merged

etagwerker merged 10 commits into
mainfrom
upgrade-rails-8.1-dual-boot

Conversation

@etagwerker

@etagwerker etagwerker commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Upgrades Rails from 7.0.4 to 8.0.5.2 and leaves the app dual-booting with 8.1.4.1. It goes one hop at a time (7.0.10, 7.1, 7.2, 8.0) using the rails-upgrade skill and next_rails. This replaces #47, which bumped each hop directly without dual-boot.

Gemfile runs 8.0 and Gemfile.next runs 8.1. The first two commits are green on 7.0. Every commit from the dual-boot setup on is green on both Gemfiles (83 examples, 0 failures), so each one is a safe stopping point.

Merging this ships 8.0. Flipping to 8.1 is a follow-up that swaps the lockfiles and collapses the NextRails.next? branches. It's already been done and tested on this branch (see 411b192, reverted in 2a2c287).

How the commits are laid out

  1. Rails 7.0.10 + ffi 1.17. Latest 7.0 patch first. ffi 1.15.5 doesn't compile on current macOS SDKs.
  2. rspec-rails 7.1 + ombu_labs-auth 1.2. Backward-compatible bumps on 7.0 so later hops don't need branching for them. ombu_labs-auth 1.2 allows Devise 5, which gets rid of the Rails.application.secrets usage that 7.2 removes.
  3. Dual-boot setup (7.0 current, 7.1 next). next_rails moves to the Gemfile root (1.2.1 to 1.7, since NextRails.next? doesn't exist in 1.2), plus the next? helper, Gemfile.next and its lockfile, and a CI matrix over both Gemfiles.
  4. Promote 7.1, next is 7.2.
  5. Promote 7.2, next is 8.0.
  6. Promote 8.0, next is 8.1.
  7. Promote 8.1, then revert it (411b192, 2a2c287). Kept in the history so the flip is easy to redo.
  8. sitemap-parser from rubygems (0579289) and a follow-up that syncs Gemfile.next.lock with it.

Each promotion collapses the previous hop's NextRails.next? branches (next side wins), so no else branch is left running on a newer Rails.

Changes that needed NextRails.next? (two-sided)

  • pool: and max_connections: in database.yml (8.1)
  • to_time_preserves_timezone = :zone is needed on 8.0 and deprecated on 8.1 (8.1)

The 7.1 branches (cache_classes, show_exceptions) were already collapsed when 7.1 was promoted.

Changes that were plain migrations (work on both sides)

  • fixture_path to fixture_paths (7.1 and 7.2)
  • to_time_preserves_timezone = :zone (7.2 and 8.0)

Things worth a close look

  • GitHub sign-in is not covered by specs. ombu_labs-auth 1.0.0 to 1.2.0 pulls in Devise 4.8 to 5.0 and a few new runtime dependencies (omniauth-google-oauth2, plus capybara, selenium-webdriver and puma). Google login is env-var driven, so GitHub login should be unaffected, but please try signing in on a review app.
  • The CI job name changed. test-rails-current is now Test (Gemfile) and Test (Gemfile.next). If branch protection requires the old check name, it needs updating.
  • Bundler moved from 2.3.23 to 2.5.22. The 2.3.23 resolver spun forever on this dependency graph. CI is updated. The Dockerfile reads the version from Gemfile.lock, so it follows along.
  • load_defaults is still 7.0. I left that for follow-up PRs, one config at a time.
  • force_ssl / assume_ssl are still commented out in production. Rails 8.0 and 8.1 both flag this as optional. Worth a separate look.

Verification

  • bundle exec rspec on Gemfile (8.0.5.2) and Gemfile.next (8.1.4.1): 83 examples, 0 failures, no DEPRECATION WARNING lines
  • Not done: a deploy to staging or a Heroku review app

🤖 Generated with Claude Code

etagwerker and others added 10 commits November 20, 2026 23:09
ffi 1.15.5 does not compile on current macOS SDKs. Rails 7.0.10 is the
latest patch of the 7.0 series, the starting point for the 8.1 upgrade.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Backward-compatible gem bumps on Rails 7.0 so the next hops don't need
version branching for them. ombu_labs-auth 1.2 allows Devise 5, which
drops the Rails.application.secrets usage that Rails 7.2 removes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- next_rails moved to the root of the Gemfile, bumped to 1.7 (NextRails.next?)
- Gemfile.next (symlink) and Gemfile.next.lock
- CI runs the suite against both Gemfile and Gemfile.next
- Two-sided 7.1 changes branch on NextRails.next?: cache_classes ->
  enable_reloading, show_exceptions = :none

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Gemfile: 7.1 current, 7.2 next
- Collapse the 7.1 NextRails.next? branches (next side wins)
- fixture_path -> fixture_paths (works on 7.1 and 7.2)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Gemfile: 7.2 current, 8.0 next
- Set to_time_preserves_timezone to :zone (works on 7.2 and 8.0)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Gemfile: 8.0 current, 8.1 next
- database.yml: pool -> max_connections on 8.1 (two-sided, branches on
  NextRails.next?)
- to_time_preserves_timezone override only on 8.0 (8.1 deprecates it)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Gemfile: rails ~> 8.1.0 (8.1.4.1) on both sides
- Collapse the 8.1 NextRails.next? branches (next side wins)

The dual-boot scaffolding (next? helper, Gemfile.next, CI matrix) is
still in place. The upgrade-cleanup skill removes it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Back to Rails 8.0 as current with 8.1 as the next (dual-boot) version, so
the PR ships 8.0 and keeps 8.1 ready to flip.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The next lockfile still pointed at the GitHub fork after sitemap-parser
moved to rubygems.org. Re-derived it from Gemfile.lock and re-resolved
Rails 8.1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@etagwerker etagwerker changed the title Upgrade Rails to 8.1 (dual-boot, one hop per commit) Upgrade Rails to 8.0, dual-boot with 8.1 Nov 22, 2026
@etagwerker
etagwerker temporarily deployed to librarian-production November 22, 2026 02:29 Inactive
@etagwerker
etagwerker marked this pull request as ready for review November 22, 2026 02:32
@etagwerker
etagwerker merged commit 57d91c1 into main Nov 22, 2026
2 checks passed

This branch was previously deployed

1 inactive deployment
librarian-production — 84c05509 Deployed Nov 22, 2026 by etagwerker
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.

1 participant