Skip to content

Upgrade Ruby to 4.0 and enable depreciation warnings in local, CI, and Elastic Beanstalk#516

Open
cycomachead wants to merge 1 commit into
mainfrom
cycomachead/189-upgrade-ruby-4-0/2
Open

Upgrade Ruby to 4.0 and enable depreciation warnings in local, CI, and Elastic Beanstalk#516
cycomachead wants to merge 1 commit into
mainfrom
cycomachead/189-upgrade-ruby-4-0/2

Conversation

@cycomachead

Copy link
Copy Markdown
Contributor

General Info

Changes

Upgrades Ruby from 3.4.10 to 4.0.6 across all environments (local, CI, Docker, Elastic Beanstalk) and enables deprecation warnings globally so upgrade-related issues surface everywhere, including production.

Ruby version bump:

  • .tool-versions, Gemfile, Dockerfile, .devcontainer/Dockerfile → Ruby 4.0.6
  • Gemfile.lock regenerated with RUBY VERSION ruby 4.0.6p0
  • Bundler bumped to 4.0.16 (ships with Ruby 4.0.6; old 2.5.6 pin caused constant-redefinition warnings)
  • .rubocop.ymlTargetRubyVersion: 4.0
  • docs/developers.md setup instructions updated

CI:

  • App workflows already read ruby-version: .tool-versions and pick up the bump automatically
  • docs.yml had a hardcoded '3.4' → updated to '4.0'

Elastic Beanstalk:

  • buildspec.ymlruby: 4.0
  • .platform/hooks/prebuild/01_install_bundler.sh → installs Bundler 4.0.16 to match the lockfile
  • ⚠️ Manual step required: Update the EB environment's platform version in the AWS console/CLI to "Ruby 4.0 running on 64bit Amazon Linux 2023"

Deprecation warnings:

  • Warning[:deprecated] = true moved from dev/test env files into config/boot.rb so it applies in every environment, including production
  • Production config changed from report_deprecations = false to report_deprecations = true + deprecation = :log so Rails deprecations are visible in production logs

Testing

  • bundle install and app boot verified on Ruby 4.0.6
  • RSpec: 574 examples, 0 failures
  • Cucumber (rack_test profile): 20 scenarios, 203 steps, all passed
  • RuboCop: 151 files, no offenses

Documentation

Developer setup instructions in docs/developers.md updated to reference Ruby 4.0.

Checklist

  • Name of branch corresponds to story

Superconductor Ticket Implementation | App Preview | Guided Review

- Update Ruby version to 4.0.6 across local, CI, Docker, and EB environments
- Bump Bundler to 4.0.16 to match Ruby 4.0 defaults
- Enable Ruby-level deprecation warnings globally in `config/boot.rb`
- Enable Rails deprecation logging in production to surface upgrade issues
- Update RuboCop and documentation to reflect the new target version

Co-authored-by: Claude Code <noreply@anthropic.com>
@cycomachead cycomachead mentioned this pull request Jul 16, 2026
20 tasks
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