Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I temporarily make my staging rails server display errors?

On my dev box when I get a backend error it gives me the error message and a stack trace. However on the staging server it just says

"We're sorry, but something went wrong. If you are the application owner check the logs for more information." 

So yeah I know I can check the logs. But what if I want to see the stack trace in the browser. Can I temporarily enable that? This is for Rails 4.04 and Ruby 2.1

like image 904
asolberg Avatar asked Oct 24 '25 14:10

asolberg


1 Answers

Yes, you can enable displaying stack trace in your staging environment by settings

config.consider_all_requests_local = true

in your confing/environments/staging.rb file of your Rails app.

like image 103
edariedl Avatar answered Oct 26 '25 04:10

edariedl



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!