Rails 7.2 browser compatibility

Posted by Louise Stone

6 months ago

1

rails7

Error message:

Rendering public/406-unsupported-browser.html / Completed 406 Not Acceptable


ISSUE:
When creating a new app in rails 7.2 there is a new feature allowing developer to set minimum browser requirements which throws an error when working in development on chrome. Result is an instant redirect to the '406 unsupported browser' view template.

Resource here on issue -> https://discuss.rubyonrails.org/t/help-rails-hello-world-complains-of-your-browser-is-not-supported-please-upgrade-your-browser-to-continue-when-displaying-simple-html/86744/1

SOLUTION:
Comment out the below line in application_controller.rb:

 allow_browser versions: :modern