I'm ready to deploy a RackServerPages application but can't seem to find a way to disable exceptions i.e, the one rendered by Rack::ShowExceptions.
Thanks!
Set the RACK_ENV environment variable to deployment.
Technically, setting ENV['RACK_ENV'] to anything besides development will disable the exceptions. Rack::ShowExceptions middleware is included by default when rack is running in the default development environment.
For Rails apps, set ENV['RACK_ENV'] to deployment, making sure you also set ENV['RAILS_ENV'] to the correct value for your environment (production, development, etc.). If ENV['RAILS_ENV'] is not set, the Rails app will fallback to ENV['RACK_ENV'] and Rails will complain about an unknown deployment environment.
If you use unicorn, you can alternatively use -E deployment to set ENV['RACK_ENV'] to deployment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With