[英]Rails 3.2.3 End user error messages instead of developer error messages in development mode with consider_all_requests_local = true
I am running my rails 3.2.3 app in development mode. 我正在开发模式下运行Rails 3.2.3应用程序。 Even though I have specified
即使我已经指定
config.consider_all_requests_local = true
in my config/environments/development.rb
configuration file, I get the "end user friendly" error pages with the red "We're sorry, but something went wrong." 在我的
config/environments/development.rb
配置文件中,出现“最终用户友好”错误页面,并带有红色的“很抱歉,出现了问题”。 when I have errors in my views, instead of the more useful "developer friendly" error pages with stack trace, etc. 当我在视图中出现错误时,而不是使用堆栈跟踪等更有用的“对开发人员友好”的错误页面。
What can I do to get the developer friendly error messages? 我该怎么做才能获得开发人员友好的错误消息?
Among my gems are omniauth and slim 我的宝石中有omniauth和苗条
Edit: The problem occurs when there are errors in views. 编辑:视图中有错误时,会发生问题。 When there are errors in controllers, the developer-friendly errors show correctly.
当控制器中存在错误时,将正确显示对开发人员友好的错误。
Have had exactly the same problem, described in the question in the bottom. 发生了完全相同的问题,在底部的问题中进行了描述。 Only saw this message in views, although development mode is and consider_all_requests_local is on.
尽管开发模式为开,并且think_all_requests_local已启用,但仅在视图中看到此消息。 In addition, my file did not contain any illegal utf-8 characters (or was marked via encoding: utf-8).
此外,我的文件没有任何非法的utf-8字符(或通过编码标记为utf-8)。
But today, I finally found the solution for my problem - hope it helps you: 但是今天,我终于找到了解决我问题的方法-希望它能对您有所帮助:
Rails doesnt log tempalte errors in development mode Rails不会在开发模式下记录临时错误
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.