在我的开发框中,当我收到后端错误时,它会给出错误消息和堆栈跟踪.然而,在临时服务器上它只是说 "We're sorry, but something went wrong. If you are the application owner check the logs for more information.
"We're sorry, but something went wrong. If you are the application owner check the logs for more information."
所以是的,我知道我可以检查日志.但是,如果我想在浏览器中看到堆栈跟踪怎么办?我可以暂时启用它吗?这适用于Rails 4.04和Ruby 2.1
是的,您可以通过设置启用在暂存环境中显示堆栈跟踪config.consider_all_requests_local = true
在您的Rails应用程序的confing / environments / staging.rb文件中.