500.html being displayed on dev instead of an error

Hello,

I’m working on a really old legacy Rails app and there is one thing someone else implemented several years ago i am not able to deal with. Basically, for any 500-like exceptions raised in the code, my app is rendering 500.html file instead of showing me the actual exception. It basically behaves like i had consider_all_requests_local config set to false in dev env but i don’t. It’s set to true. Also, i don’t have any exceptions_app app configured, i don’t use any rescue_from statements that could impact it - i can’t see any single place in my codebase that could impact how 500 error pages are displayed.

Do you have any idea where should i look or how can i debug rails behavior regarding that?

  • Rails: 7.0.8
  • Ruby: 3.2.3

Thanks in advance for any clues!

1 Like

There is some Rails/Rack middleware that deals with exception handling. Try adding debug statements to your local ShowExceptions and DebugExceptions classes in actionpack.

Huh?! I’m currently facing the same issue but for a newly created rails 7 application.

Rails: 7.1.3.2 Ruby: ruby 3.1.4p0 (jruby 9.4.6.0)

Added just one single route, but every request leads to /public/500.html not showing any error in the logs/console…

Applikation had been created with

rails new lsv -d jdbcpostgresql --skip-action-mailer --skip-action-mailbox --skip-action-text --skip-active-job --skip-active-storage --skip-action-cable --asset-pipeline=sprockets --skip-javascript --skip-hotwire --skip-test --skip-system-test --css=sass --skip-decrypted-diffs

Any ideas?