Skip to content

Upgrade to Ruby 4.0 and Rails 8.1 - #2

Open
cjavdev wants to merge 1 commit into
mainfrom
claude/upgrade-runtimes
Open

cjavdev wants to merge 1 commit into
mainfrom
claude/upgrade-runtimes

Conversation

@cjavdev

@cjavdev cjavdev commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Requested by CJ · project thread

Moves the app from Ruby 3.1.2 and a pre-release Rails 7.1 (it tracked rails/rails main) to Ruby 4.0.9 and Rails 8.1.4.

  • Major gem upgrades: byebug 11.1.3 → 12.0.0, devise 4.8.1 → 5.0.4, faker 2.22.0 → 3.8.0, puma 5.6.4 → 7.2.1, rails 7.1.0.alpha → 8.1.4, redis 4.7.1 → 5.4.1, sidekiq 6.5.3 → 7.3.9, turbo-rails 1.1.1 → 2.0.23.
  • 13 other direct gems moved to their latest minor/patch release.
  • devise 4 → 5, sidekiq 6 → 7.3, puma 5 → 7, redis 4 → 5, faker 3, byebug 12.
    • Sidekiq 8 needs Redis 7, which I couldn't confirm for this app, so it stops at 7.3.
  • Held back: stripe stays on 7.x (latest 7.1.2). Later majors pin newer Stripe API versions, and this app leans on Connect, Issuing and Treasury. That's worth moving deliberately with test-mode keys, not blind.
  • annotate → annotaterb. The old lib/tasks/auto_annotate_models.rake is replaced by what annotate_rb:install generates (lib/tasks/annotate_rb.rake and .annotaterb.yml). The old file required annotate, which made every rake task in development fail.
  • config/initializers/stripe.rb reads the key with credentials.dig(:stripe, :secret), so the app can boot (and precompile assets) without the master key.
  • JavaScript (Yarn): esbuild 0.14 → 0.28, @hotwired/turbo-rails 7 → 8, @rails/activestorage 8.1, and the latest @tailwindcss/forms, autoprefixer and postcss.
    • tailwindcss stays on 3.4. v4 replaces the config format and the CLI the build:css script uses.
    • Removed the stale package-lock.json. Procfile.dev builds with Yarn and yarn.lock is the lockfile that got updated.

Tested on Ruby 4.0.9, Node 24 and Postgres 18:

  • yarn build and yarn build:css finish.
  • db:schema:load and zeitwerk:check pass.
  • A production assets:precompile finishes.
  • The development server answers GET / and /users/sign_in with 200.
  • There are no tests in the repo, and the Stripe flows weren't exercised.

Generated by Claude Code

Moves the app from Ruby 3.1.2 and a pre-release Rails 7.1 (it tracked `rails/rails` main) to Ruby 4.0.9 and Rails 8.1.4.

- Major gem upgrades: byebug 11.1.3 → 12.0.0, devise 4.8.1 → 5.0.4, faker 2.22.0 → 3.8.0, puma 5.6.4 → 7.2.1, rails 7.1.0.alpha → 8.1.4, redis 4.7.1 → 5.4.1, sidekiq 6.5.3 → 7.3.9, turbo-rails 1.1.1 → 2.0.23.
- 13 other direct gems moved to their latest minor/patch release.
- `devise` 4 → 5, `sidekiq` 6 → 7.3, `puma` 5 → 7, `redis` 4 → 5, `faker` 3, `byebug` 12.
  - Sidekiq 8 needs Redis 7, which I couldn't confirm for this app, so it stops at 7.3.
- Held back: `stripe` stays on 7.x (latest 7.1.2). Later majors pin newer Stripe API versions, and this app leans on Connect, Issuing and Treasury. That's worth moving deliberately with test-mode keys, not blind.
- `annotate` → `annotaterb`. The old `lib/tasks/auto_annotate_models.rake` is replaced by what `annotate_rb:install` generates (`lib/tasks/annotate_rb.rake` and `.annotaterb.yml`). The old file required `annotate`, which made every rake task in development fail.
- `config/initializers/stripe.rb` reads the key with `credentials.dig(:stripe, :secret)`, so the app can boot (and precompile assets) without the master key.
- JavaScript (Yarn): `esbuild` 0.14 → 0.28, `@hotwired/turbo-rails` 7 → 8, `@rails/activestorage` 8.1, and the latest `@tailwindcss/forms`, `autoprefixer` and `postcss`.
  - `tailwindcss` stays on 3.4. v4 replaces the config format and the CLI the `build:css` script uses.
  - Removed the stale `package-lock.json`. `Procfile.dev` builds with Yarn and `yarn.lock` is the lockfile that got updated.

**Tested** on Ruby 4.0.9, Node 24 and Postgres 18:
- `yarn build` and `yarn build:css` finish.
- `db:schema:load` and `zeitwerk:check` pass.
- A production `assets:precompile` finishes.
- The development server answers `GET /` and `/users/sign_in` with 200.
- There are no tests in the repo, and the Stripe flows weren't exercised.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gonqd8r6LGNnG5fs4KpEYa
@cjavdev cjavdev self-assigned this Oct 24, 2026

This branch has not been deployed

No deployments
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