Skip to content

Stop passing format: :html to the Ember app route - #700

Merged
tricknotes merged 1 commit into
mainfrom
fix-rails-main-format-symbol
Nov 9, 2026
Merged

tricknotes merged 1 commit into
mainfrom
fix-rails-main-format-symbol

Conversation

@tricknotes

Copy link
Copy Markdown
Owner

The experimental Rails main job has been failing since 2026-11-01 (hidden by continue-on-error) with 8 failures, all of them asset requests answered with the Ember app's HTML.

Cause

rails/rails#59418 makes a Symbol format: route option take effect: it used to fall through normalize_format and be ignored, and now becomes a format requirement with html as the default.

mount_ember_app has passed format: :html to its (*rest) route since the helper was introduced. With the option now honoured, a path such as /assets/app.js matches that route as rest: "assets/app.js", format: "html", EmberConstraint sees an HTML request, and the request never reaches the mounted Rack::Files or the development server proxy.

Fix

Drop format: :html. It was a no-op on every Rails version until now, so released Rails keeps its behaviour and Rails main gets the previous behaviour back.

Verification

In Docker (Ruby 4.0, Node 26), rspec --tag ~js:

  • Rails main (f1e1f3c): the 4 previously failing request specs pass
  • Rails 8.1: unchanged

The only failure left in both is EmberCli::App#test, which needs Chrome, which the container lacked. The browser feature specs weren't run locally; CI covers them.

🤖 Generated with Claude Code

Rails ignored a Symbol `format:` until rails/rails#59418, which turns it
into a format requirement with `html` as the default. With that, the
`(*rest)` glob of the route `mount_ember_app` draws swallowed the
extension of an asset path such as `/assets/app.js`, the request's
format became `html`, and `EmberConstraint` let it through, so assets
were answered with the application's `index.html` instead of reaching
the mounted `Rack::Files` or the development server proxy.

The option has been a no-op on every Rails version the helper ran on
until now, so dropping it keeps their behaviour and restores it on
Rails main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tricknotes
tricknotes merged commit 9d0680a into main Nov 9, 2026
17 checks passed
@tricknotes
tricknotes deleted the fix-rails-main-format-symbol branch November 9, 2026 17:08
@tricknotes tricknotes mentioned this pull request Nov 9, 2026
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