1

I run my rails application (Rails 4.2.x) with the passenger module for Apache.

Is there a way to not show error messages:

enter image description here

Thanks.

fkoessler
  • 6,932
  • 11
  • 60
  • 92
Felix
  • 5,452
  • 12
  • 68
  • 163
  • production env is not configured to show stack traces. But even if you want you can configure that. Already i can such a question posted. Check this: http://stackoverflow.com/questions/11601484/rails-error-in-production-mode – bluefoggy Jul 01 '16 at 07:58

3 Answers3

3

Make sure the following setting is set to false in your config/environment/production.rb file:

config.consider_all_requests_local = false
Daniel B
  • 72
  • 1
  • 9
1

Don't run your production mode like this, you may hack it that it would show errors like that. But you got all your errors in your logs.

check log/production.log for your errors.

siegy22
  • 4,295
  • 3
  • 25
  • 43
  • Problem is that it shows the errors now. But I don't want it. How can I turn this off for production? – Felix Jul 01 '16 at 08:02
  • 1
    I am sorry.. `config.consider_all_requests_local = false` would be the solution in your config/environments/production.rb – siegy22 Jul 01 '16 at 08:31
1

Make sure that you have the following setting in your config/environments/production.rb file:

config.consider_all_requests_local       = false
fkoessler
  • 6,932
  • 11
  • 60
  • 92