Rails 8.1.0 (October 22, 2025)¶ ↑
-
Suggest
bin/rails action_text:installfrom Action Dispatch error pageSean Doyle
-
Remove deprecated
STATS_DIRECTORIES.Rafael Mendonça França
-
Remove deprecated
bin/rake statscommand.Rafael Mendonça França
-
Remove deprecated
rails/console/methods.rbfile.Rafael Mendonça França
-
Don't generate system tests by default.
Railsscaffold generator will no longer generate system tests by default. To enable this pass--system-tests=trueor generate them withbin/rails generate system_test name_of_test.Eileen M. Uchitelle
-
Optionally skip bundler-audit.
Skips adding the
bin/bundler-audit&config/bundler-audit.ymlif the gem is not installed whenbin/rails app:updateruns.Passes an option to
--skip-bundler-auditwhen new apps are generated & adds that same option to the--minimalgenerator flag.Jill Klang
-
Show engine routes in
/rails/info/routesas well.Petrik de Heus
-
Exclude
asset_pathconfiguration from Kamaldeploy.ymlfor API applications.API applications don't serve assets, so the
asset_pathconfiguration indeploy.ymlis not needed and can cause 404 errors on in-flight requests. The asset_path is now only included for regularRailsapplications that serve assets.Saiqul Haq
-
Reverted the incorrect default
config.public_file_server.headersconfig.If you created a new application using
Rails8.1.0.beta1, make sure to regenerateconfig/environments/production.rb, or to manually edit theconfig.public_file_server.headersconfiguration to just be:# Cache assets for far-future expiry since they are all digest stamped. config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" }
Jean Boussier
-
Add command
rails credentials:fetch PATHto get the value of a credential from the credentials file.$ bin/rails credentials:fetch kamal_registry.password
Matthew Nguyen, Jean Boussier
-
Generate static BCrypt password digests in fixtures instead of dynamic
ERBexpressions.Previously, fixtures with password digest attributes used
<%= BCrypt::Password.create("secret") %>, which regenerated the hash on each test run. Now generates a static hash with a comment showing how to recreate it.Nate Smith, Cassia Scheffer
-
Broaden the
.gitignoreentry when adding a credentials key to ignore all key files.Greg Molnar
-
Remove unnecessary
ruby-versioninput fromruby/setup-rubyTangRufus
-
Add --reset option to bin/setup which will call db:reset as part of the setup.
DHH
-
Add RuboCop cache restoration to RuboCop job in GitHub Actions workflow templates.
Lovro Bikić
-
Skip generating mailer-related files in authentication generator if the application does not use
ActionMailerRami Massoud
-
Introduce
bin/cifor running your tests, style checks, and security audits locally or in the cloud.The specific steps are defined by a new DSL in
config/ci.rb.ActiveSupport::ContinuousIntegration.run do step "Setup", "bin/setup --skip-server" step "Style: Ruby", "bin/rubocop" step "Security: Gem audit", "bin/bundler-audit" step "Tests: Rails", "bin/rails test test:system" end
Optionally use gh-signoff to set a green PR status - ready for merge.
Jeremy Daer, DHH
-
Generate session controller tests when running the authentication generator.
Jerome Dalbert
-
Add bin/bundler-audit and config/bundler-audit.yml for discovering and managing known security problems with app gems.
DHH
-
Railsno longer generates abin/bundlebinstub when creating new applications.The
bin/bundlebinstub used to help activate the right version of bundler. This is no longer necessary as this mechanism is now part of Rubygem itself.Edouard Chin
-
Add a
SessionTestHelpermodule withsign_in_as(user)andsign_outtest helpers when runningrails g authentication. Simplifies authentication in integration tests.Bijan Rahnema
-
Rate limit password resets in authentication generator
This helps mitigate abuse from attackers spamming the password reset form.
Chris Oliver
-
Update
rails new --minimaloptionExtend the
--minimalflag to exclude recently added features:skip_brakeman,skip_ci,skip_docker,skip_kamal,skip_rubocop,skip_solidandskip_thruster.eelcoj
-
Add
application-namemetadata to application layoutThe following metatag will be added to
app/views/layouts/application.html.erb<meta name="application-name" content="Name of Rails Application">
Steve Polito
-
Use
secret_key_basefrom ENV or credentials when present locally.When ENV or
Rails.application.credentials.secret_key_baseis set for test or development, it is used for theRails.config.secret_key_base, instead of generating atmp/local_secret.txtfile.Petrik de Heus
-
Introduce
RAILS_MASTER_KEYplaceholder in generated ci.yml filesSteve Polito
-
Colorize the
Railsconsole prompt even on non standard environments.Lorenzo Zabot
-
Don't enable YJIT in development and test environments
Development and test environments tend to reload code and redefine methods (e.g. mocking), hence YJIT isn't generally faster in these environments.
Ali Ismayilov, Jean Boussier
-
Only include PermissionsPolicy::Middleware if policy is configured.
Petrik de Heus
Please check 8-0-stable for previous changes.