{"slug": "ractor-ready-rails-ordered-cache-fetches-and-more", "title": "Ractor-ready Rails, ordered cache fetches, and more!", "summary": "Rails' latest weekly update highlights progress toward Ractor support, with controller configuration, Action View settings, Active Record commit callbacks, and time zone configuration now shareable across Ractors, and a fix for TypeCaster connection leaks. The update also includes ordered cache fetches in fetch_multi, PostgreSQL error verbosity configuration, and an upgrade to Marcel 2 for Active Storage.", "body_md": "Hi, it’s [Vipul](https://github.com/vipulnsward). Let’s explore this week’s changes in the Rails codebase.\n\n[Agents on Rails: Claude Fable 5.1 and GLM 5.3 Flash](https://rubyonrails.org/2026/9/2/agents-on-rails-claude-fable-5-1-and-glm-5-3-flash)\n\nClaude Fable 5.1 matched Opus 5 at the top of the Agents on Rails leaderboard with 58 of 63 successful runs, while costing less and finishing faster. The formerly unnamed `ox-alpha` model is GLM 5.3 Flash, which completed 52 of 63 runs for $3.31.\n\n[On Rails: Rate Limiting For Your Customers](https://rubyonrails.org/2026/9/1/on-rails-kagen-hearn-and-eddie-galindo-ascend)\n\nRobby Russell spoke with Eddie Galindo and Kagen Hearn from Ascend about scaling one Rails monolith as larger customers arrived, finding the limits of its data ingestion pipeline, and shipping software that moves money.\n\n[Rails keeps moving toward Ractor support](https://github.com/rails/rails/pull/58647)\n\nRails made controller configuration, [Action View settings](https://github.com/rails/rails/pull/58620), [Active Record commit callbacks](https://github.com/rails/rails/pull/58653), and [time zone configuration](https://github.com/rails/rails/pull/58642) shareable across Ractors.\n\nActive Record’s schema context also [no longer deadlocks when initializing attributes](https://github.com/rails/rails/pull/58651), while [event reporters](https://github.com/rails/rails/pull/58599) now use per-Ractor storage on non-main Ractors.\n\n[Fix TypeCaster sometimes leaking a connection](https://github.com/rails/rails/pull/58645)\n\n`TypeCaster` now uses `with_connection`, so it checks the connection back into the pool immediately instead of relying on executor cleanup. This fixes a connection leak seen in `ActionController::Live` actions.\n\n[Preserve fetch_multi key order with a local cache](https://github.com/rails/rails/pull/58639)\n\n`ActiveSupport::Cache::Strategy::LocalCache#fetch_multi` used to return local hits before misses, changing the order requested by the caller. It now returns keys in the original order, matching `Store#fetch_multi`.\n\n[Configure PostgreSQL error verbosity](https://github.com/rails/rails/pull/58638)\n\nThe PostgreSQL adapter now accepts an `error_verbosity` option in `database.yml` and applies it when each connection is configured.\n\n```\nproduction:\n  adapter: postgresql\n  error_verbosity: <%= PG::PQERRORS_TERSE %>\n```\n\n[Re-enable PostgreSQL triggers when disable_referential_integrity raises](https://github.com/rails/rails/pull/58635)\n\nRails now restores disabled triggers from an `ensure` block. Raising inside `disable_referential_integrity` no longer risks leaving triggers disabled after the block exits.\n\n[Avoid a redundant join in scoped through associations](https://github.com/rails/rails/pull/58625)\n\nActive Record now removes duplicate joins when merging a scoped `has_many :through` association. The generated query keeps the joins it needs without adding the same table twice.\n\n[Shuffle unordered Active Record query results in tests](https://github.com/rails/rails/pull/58548)\n\nA new configuration can shuffle results from most `SELECT` queries without an `ORDER BY`, making accidental order dependencies easier to catch in the test suite.\n\n```\nconfig.active_record.shuffle_unordered_selects = true\n```\n\n[Upgrade Active Storage to Marcel 2](https://github.com/rails/rails/pull/58549)\n\nActive Storage now depends on Marcel 2 for broader MIME type detection and additional hardening. Some newly analyzed files may receive canonical content types where Marcel 1 returned aliases; existing blobs keep their stored content types. Check any code that compares content type strings before upgrading.\n\n[Fix JSON 3.0 compatibility](https://github.com/rails/rails/pull/58601)\n\nActive Support now passes options to `JSON.parse` as keyword arguments, which is required by JSON 3.0. Rails also fixed [custom encode options in `ActiveRecord::Coders::JSON`](https://github.com/rails/rails/pull/58612) and [encrypted fixtures backed by JSON columns](https://github.com/rails/rails/pull/58606). Apps testing JSON 3.0 should no longer hit the argument errors these paths raised.\n\n[Add timeouts to generated GitHub Actions jobs](https://github.com/rails/rails/pull/58595)\n\nNew Rails applications now set a 15-minute timeout on each generated GitHub Actions job. Applications with longer test suites can raise or remove the limit.\n\n[Two new guides are up for review](https://github.com/rails/rails/pull/58617)\n\nThe much anticipated [Hotwire guide](https://github.com/rails/rails/pull/58617) and a [rewrite of the Securing Rails guide](https://github.com/rails/rails/pull/58618) are open for review. Take a look and share your feedback!\n\n*You can view the whole list of changes [here](https://github.com/rails/rails/compare/@%7B2026-08-28%7D...main@%7B2026-09-04%7D).*\n\n*We had [25 contributors](https://contributors.rubyonrails.org/contributors/in-time-window/20260828-20260904) to the Rails codebase this past week!*\n\nUntil next time!\n\n[Subscribe](https://world.hey.com/this.week.in.rails) to get these updates mailed to you.", "url": "https://wpnews.pro/news/ractor-ready-rails-ordered-cache-fetches-and-more", "canonical_source": "https://rubyonrails.org/2026/9/4/this-week-in-rails", "published_at": "2026-09-04 00:00:00+00:00", "updated_at": "2026-09-07 04:25:59.430776+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Rails", "Active Record", "Active Support", "Active Storage", "PostgreSQL", "Marcel", "JSON", "Vipul"], "alternates": {"html": "https://wpnews.pro/news/ractor-ready-rails-ordered-cache-fetches-and-more", "markdown": "https://wpnews.pro/news/ractor-ready-rails-ordered-cache-fetches-and-more.md", "text": "https://wpnews.pro/news/ractor-ready-rails-ordered-cache-fetches-and-more.txt", "jsonld": "https://wpnews.pro/news/ractor-ready-rails-ordered-cache-fetches-and-more.jsonld"}}