From 2c8f261287ad8d6fe065482ec1273bbb2cf47bf6 Mon Sep 17 00:00:00 2001 From: Chris Zetter <253059100+zetter-rpf@users.noreply.github.com> Date: Wed, 29 Apr 2026 11:56:55 +0100 Subject: [PATCH 1/5] Switch to 7.2 defaults You can see new settings at [1], they all seem safe for us to switch to. I'll monitor RAM usage in Heroku after deploying because of the YJIT change. [1] https://redirect.github.com/rails/rails/blob/v7.2.3.1/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_2.rb.tt --- config/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index e8b482e8c..faf34a361 100644 --- a/config/application.rb +++ b/config/application.rb @@ -24,7 +24,7 @@ module App class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 7.1 + config.load_defaults 7.2 config.add_autoload_paths_to_load_path = false From bfb82d5bcc3d0cdf7a5fd7fe6bd7aca19c861652 Mon Sep 17 00:00:00 2001 From: Chris Zetter <253059100+zetter-rpf@users.noreply.github.com> Date: Wed, 29 Apr 2026 11:57:17 +0100 Subject: [PATCH 2/5] Add rubocop binstub This was suggested by the rails upgrade tool --- bin/rubocop | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 bin/rubocop diff --git a/bin/rubocop b/bin/rubocop new file mode 100755 index 000000000..40330c0ff --- /dev/null +++ b/bin/rubocop @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby +require "rubygems" +require "bundler/setup" + +# explicit rubocop config increases performance slightly while avoiding config confusion. +ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__)) + +load Gem.bin_path("rubocop", "rubocop") From 2bb02deefd49ad8e83938f8efff0bf5c0c280e72 Mon Sep 17 00:00:00 2001 From: Chris Zetter <253059100+zetter-rpf@users.noreply.github.com> Date: Wed, 29 Apr 2026 12:16:43 +0100 Subject: [PATCH 3/5] Remove misleading comment --- config/application.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index faf34a361..6eec39bd9 100644 --- a/config/application.rb +++ b/config/application.rb @@ -23,7 +23,6 @@ module App class Application < Rails::Application - # Initialize configuration defaults for originally generated Rails version. config.load_defaults 7.2 config.add_autoload_paths_to_load_path = false From ce5f3647d8c1d0da0388eb58e1eed123e1c4ca9c Mon Sep 17 00:00:00 2001 From: Chris Zetter <253059100+zetter-rpf@users.noreply.github.com> Date: Wed, 29 Apr 2026 12:31:28 +0100 Subject: [PATCH 4/5] Remove extra logging config This was confusing as the logger was configured twice in this file. Previous versions of rails didn't log to STDOUT in prod by default, they do now so we can remove this and the log_formatter setting. The formatter is also not used if the logger is set [1] [1] https://guides.rubyonrails.org/configuring.html#config-log-formatter --- config/environments/production.rb | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index cd0b8ca17..a9ec297f0 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -82,19 +82,6 @@ # Don't log any deprecations. config.active_support.report_deprecations = false - # Use default logging formatter so that PID and timestamp are not suppressed. - config.log_formatter = Logger::Formatter.new - - # Use a different logger for distributed setups. - # require "syslog/logger" - # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") - - if ENV['RAILS_LOG_TO_STDOUT'].present? - logger = ActiveSupport::Logger.new($stdout) - logger.formatter = config.log_formatter - config.logger = ActiveSupport::TaggedLogging.new(logger) - end - # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false From 792d3f577fef64410ecf9e89e2f7489b646073c0 Mon Sep 17 00:00:00 2001 From: Chris Zetter <253059100+zetter-rpf@users.noreply.github.com> Date: Wed, 29 Apr 2026 14:46:30 +0100 Subject: [PATCH 5/5] Make clearer we're on Rails 7.2 --- Gemfile | 2 +- Gemfile.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index cda54d942..bdad43027 100644 --- a/Gemfile +++ b/Gemfile @@ -41,7 +41,7 @@ gem 'propshaft' gem 'puma', '~> 7.2' gem 'rack_content_type_default', '~> 1.1' gem 'rack-cors' -gem 'rails', '~> 7.1' +gem 'rails', '~> 7.2' gem 'ruby-progressbar', '~> 1.13', require: false gem 'sentry-rails' gem 'statesman' diff --git a/Gemfile.lock b/Gemfile.lock index 6b80775d6..93a12cc3f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -617,7 +617,7 @@ DEPENDENCIES puma (~> 7.2) rack-cors rack_content_type_default (~> 1.1) - rails (~> 7.1) + rails (~> 7.2) rails-erd rspec rspec-rails