bo-oz
bo-oz

Reputation: 2872

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?

Upvotes: 3

Views: 496

Answers (1)

Sergio Tulentsev
Sergio Tulentsev

Reputation: 230561

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

Upvotes: 4

Related Questions