I thought I read that when a Ruby on Rails server is running in production mode, it won’t say so much about an error (the details, showing the code)… but I just try to run the server using
ruby script/server -e production
and add a <%= x %> with the local variable x undefined. It showed a lot of error details including the code… is there a way to make it look better?
It depends on what do you want to achieve – you might add general exception catching / rescue_from procedure to the ApplicationController, and there put error logging and redirect to some generic “we’re sorry” page.