Upgrade Ruby 3.3.11 -> 3.4.9 and DRY the version pins#73
Merged
Conversation
Single-minor Ruby hop to the latest 3.4 patch (already on the latest 3.3 patch, so no pre-step bump). Rails stays 8.0.5 on both boots. 3.4 makes Prism the default parser (ruby -v now shows +PRISM) -- an internal change for standard syntax; caught nothing here (boot + suite green). Also collapse the Ruby version to a single source of truth per review: - .ruby-version is now the one place the exact patch lives. - Gemfile reads it: `ruby file: ".ruby-version"`. - CI reads it: ruby/setup-ruby `ruby-version-file: ".ruby-version"`. - Removed .ruby-version.sample (redundant: .ruby-version is tracked, so a fresh clone always has it) and the now-dead bin/setup block that copied the sample into place. - .tool-versions (asdf) and Dockerfile (base image tag) still carry the literal version -- neither can read .ruby-version at the point it's needed -- so the version now lives in 3 places instead of 6. Locks relocked on 3.4.9 (RUBY VERSION 3.4.9p82, PLATFORMS ruby only, BUNDLED WITH -> 2.6.9 from the bundler shipped with 3.4.9). Verified on the host (asdf ruby 3.4.9): - Deprecation sweep on 3.3.11: completely clean, zero warnings. - bundle lock: no gem required_ruby_version conflicts. - Bundler resolves the `ruby file:` directive from .ruby-version. - Dev and production boot clean; suite green (16 runs, 52 assertions, 0 failures, 0 errors).
CI lint failed on the Ruby 3.4 hop with `RuboCop found unknown Ruby version: 3.4` -- rubocop 1.59.0 (Dec 2023) predates Ruby 3.4 and, with no explicit TargetRubyVersion, infers 3.4 from the bumped Ruby and aborts. `bundle update rubocop rubocop-ast rubocop-rails rubocop-rails-omakase` in both lockfiles: rubocop 1.59.0 -> 1.88.1, rubocop-rails 2.23.1 -> 2.35.5, rubocop-rails-omakase 1.0.0 -> 1.1.0. `bundle exec rubocop -c ./.rubocop_with_todo.yml .` now runs clean -- 42 files, no offenses (no new cops flagged existing code).
autoprefixer-rails (Sprockets asset compile) needs a JS runtime, and ExecJS auto-detects one off PATH. On a machine with a Bun shim on PATH (e.g. asdf), it picks Bun, which autoprefixer-rails rejects: "Your ExecJS runtime Bun.sh isn't supported by autoprefixer-rails". This hit `bin/dev` locally; it's not Ruby-version-specific. Pin EXECJS_RUNTIME=Node in .env.sample (dotenv-rails loads it before assets compile) so the app uses Node -- already the intended runtime (nodejs is in .tool-versions). .env is gitignored, so apply the same line to your local .env (bin/setup seeds a fresh one from this sample).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Single-minor Ruby hop: 3.3.11 → 3.4.9 (latest 3.4 patch). Rails stays 8.0.5 on both boots. Follows #72 (Ruby 3.3, merged).
Ruby 3.4 makes Prism the default parser (
ruby -vnow shows+PRISM). For standard syntax this is invisible; it caught nothing here (boot + full suite green).Also: collapse the version pins to one source of truth
Per review — the exact patch version was previously duplicated across 6 files. Now:
.ruby-versionis the single source.Gemfilereads it:ruby file: ".ruby-version".ruby/setup-rubyruby-version-file: ".ruby-version"..ruby-version.sample(redundant —.ruby-versionis tracked, so a fresh clone always has it) and the now-deadbin/setupblock that copied the sample into place..tool-versions(asdf) andDockerfile(base image tag) still carry the literal version — neither can read.ruby-versionat the point it's needed — so the version now lives in 3 places instead of 6.Lockfiles
Relocked on 3.4.9:
RUBY VERSION→3.4.9p82,PLATFORMSstaysrubyonly,BUNDLED WITH→2.6.9(bundler shipped with Ruby 3.4.9).Verification (host, asdf ruby 3.4.9, Postgres 16.13)
RUBYOPT="-W:deprecated"): completely clean, zero warnings.bundle lockresolved with no gemrequired_ruby_versionconflicts.ruby file:directive from.ruby-version.