Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting detailed errors in Rails

Somehow my local Rails app is no longer showing detailed error messages. Instead, it shows "We're sorry, but something went wrong." by default. This means I have to check the log each time. I tried forcing the server to start in development mode by running:

RAILS_ENV=development bundle exec rails s

Any ideas on how to get the error logging back?

like image 759
bo-oz Avatar asked Nov 29 '25 16:11

bo-oz


1 Answers

Instead, it shows "We're sorry, but something went wrong."

This is in production, I take it? If so, this is as intended. You don't display detailed error messages (with stacktraces and sensitive data) to end users.

So yes, either watch your logs, or set up one of the many exception tracking services (honeybadger, sentry, etc.)


If you want to do it anyway (against all advice), set this in your config/environments/production.rb

config.consider_all_requests_local = true
like image 169
Sergio Tulentsev Avatar answered Dec 02 '25 07:12

Sergio Tulentsev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!