Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
More atrubyonrails.org:

Ruby on Rails 8.0 Release Notes

Highlights in Rails 8.0:

  • Kamal 2.
  • Thruster.
  • Solid Cable.
  • Solid Cache.
  • Propshaft is used by default.
  • Authentication system generator.

These release notes cover only the major changes. To learn about various bugfixes and changes, please refer to the changelogs or check out thelist ofcommits in the main Railsrepository on GitHub.

1. Upgrading to Rails 8.0

If you're upgrading an existing application, it's a great idea to have good testcoverage before going in. You should also first upgrade to Rails 7.2 in case youhaven't and make sure your application still runs as expected before attemptingan update to Rails 8.0. A list of things to watch out for when upgrading isavailable in theUpgrading Ruby on Railsguide.

2. Major Features

2.1. Kamal 2

Rails now comes preconfigured withKamal 2 fordeploying your application. Kamal takes a fresh Linux box and turns it into anapplication or accessory server with just a single “kamal setup” command.

Kamal 2 also includes a proxy calledKamal Proxyto replace the generic Traefik option it used at launch.

2.2. Thruster

The Dockerfile has been upgraded to include a new proxy calledThruster, which sits in front of thePuma web server to provide X-Sendfile acceleration, asset caching, and assetcompression.

2.3. Solid Cable

Solid Cable replaces Redis to act asthe pubsub server to relay WebSocket messages from the application to clientsconnected to different processes. Solid Cable retains the messages sent inthe database for a day by default.

2.4. Solid Cache

Solid Cache replaces eitherRedis or Memcached for storing HTML fragment caches in particular.

2.5. Solid Queue

Solid Queue replaces the need forRedis, also a separate job-running framework, like Resque, Delayed Job, orSidekiq.

For high-performance installations, it’s built on the newFOR UPDATE SKIP LOCKEDmechanism first introduced in PostgreSQL 9.5, but now also available in MySQL 8.0and beyond. It also works with SQLite.

2.6. Propshaft

Propshaft is now the default assetpipeline, replacing the old Sprockets system.

2.7. Authentication

Authentication system generator,creates a starting point for a session-based, password-resettable,metadata-tracking authentication system.

3. Railties

Please refer to theChangelog for detailed changes.

3.1. Removals

  • Remove deprecatedconfig.read_encrypted_secrets.

  • Remove deprecated filerails/console/app.

  • Remove deprecated filerails/console/helpers.

  • Remove deprecated support to extend Rails console throughRails::ConsoleMethods.

3.2. Deprecations

  • Deprecate requiring"rails/console/methods".

  • Deprecate modifyingSTATS_DIRECTORIES in favor ofRails::CodeStatistics.register_directory.

  • Deprecatebin/rake stats in favor ofbin/rails stats.

3.3. Notable changes

  • SetRegexp.timeout to1s by default to improve security over Regexp Denial-of-Service attacks.

4. Action Cable

Please refer to theChangelog for detailed changes.

4.1. Removals

4.2. Deprecations

4.3. Notable changes

5. Action Pack

Please refer to theChangelog for detailed changes.

5.1. Removals

  • RemoveRails.application.config.action_controller.allow_deprecated_parameters_hash_equality.

5.2. Deprecations

  • Deprecate drawing routes with multiple paths to make routing faster.

5.3. Notable changes

  • Introduce safer, more explicit params handling method withparams#expect such thatparams.expect(table: [ :attr ]) replacesparams.require(:table).permit(:attr).

6. Action View

Please refer to theChangelog for detailed changes.

6.1. Removals

  • Remove deprecated support to passingnil to themodel: argument ofform_with.

  • Remove deprecated support to passing a content to void tag elements on thetag builder.

6.2. Deprecations

6.3. Notable changes

7. Action Mailer

Please refer to theChangelog for detailed changes.

7.1. Removals

7.2. Deprecations

7.3. Notable changes

8. Active Record

Please refer to theChangelog for detailed changes.

8.1. Removals

  • Remove deprecatedconfig.active_record.commit_transaction_on_non_local_return.

  • Remove deprecatedconfig.active_record.allow_deprecated_singular_associations_name.

  • Remove deprecated support to finding database adapters that aren't registered to Active Record.

  • Remove deprecated support for definingenum with keyword arguments.

  • Remove deprecatedconfig.active_record.warn_on_records_fetched_greater_than.

  • Remove deprecatedconfig.active_record.sqlite3_deprecated_warning.

  • Remove deprecatedActiveRecord::ConnectionAdapters::ConnectionPool#connection.

  • Remove deprecated support to passing a database name tocache_dump_filename.

  • Remove deprecated support to settingENV["SCHEMA_CACHE"].

8.2. Deprecations

  • Deprecate theretries option for theSQLite3Adapter in favor oftimeout.

8.3. Notable changes

  • Runningdb:migrate on a fresh database now loads the schema before runningmigrations. Subsequent calls will run pending migrations.(If you need the previous behavior of running migrations from scratch instead of loading theschema file, this can be done by runningdb:migrate:reset whichwill drop and recreate the database before running migrations)

9. Active Storage

Please refer to theChangelog for detailed changes.

9.1. Removals

9.2. Deprecations

  • Deprecate the Azure backend for Active Storage.

9.3. Notable changes

10. Active Model

Please refer to theChangelog for detailed changes.

10.1. Removals

10.2. Deprecations

10.3. Notable changes

11. Active Support

Please refer to theChangelog for detailed changes.

11.1. Removals

  • Remove deprecatedActiveSupport::ProxyObject.

  • Remove deprecated support to settingattr_internal_naming_format with a@ prefix.

  • Remove deprecated support to passing an array of strings toActiveSupport::Deprecation#warn.

11.2. Deprecations

  • DeprecateBenchmark.ms.

  • Deprecate addition andsince between twoTime andActiveSupport::TimeWithZone.

11.3. Notable changes

12. Active Job

Please refer to theChangelog for detailed changes.

12.1. Removals

  • Remove deprecatedconfig.active_job.use_big_decimal_serializer.

12.2. Deprecations

  • Deprecateenqueue_after_transaction_commit.

  • Deprecate internalSuckerPunch adapter in favor of the adapter includedwith thesucker_punch gem.

12.3. Notable changes

13. Action Text

Please refer to theChangelog for detailed changes.

13.1. Removals

13.2. Deprecations

13.3. Notable changes

14. Action Mailbox

Please refer to theChangelog for detailed changes.

14.1. Removals

14.2. Deprecations

14.3. Notable changes

15. Ruby on Rails Guides

Please refer to theChangelog for detailed changes.

15.1. Notable changes

16. Credits

See thefull list of contributors to Railsfor the many people who spent many hours making Rails, the stable and robustframework it is. Kudos to all of them.



Back to top
[8]ページ先頭

©2009-2025 Movatter.jp