在开发模式下没有获得视图错误的调试输出 [英] Not getting debug output for view errors in development mode
问题描述
这很奇怪.目前,我在视图中有某种错误,但看不到它是什么.此外,Web 服务器跟踪中没有调试输出.
This is very odd. At the moment, I have some kind of error in a view, but can't see what it is. Also, no debug output in the web server trace.
Rails 3.2.2 应用程序是 2.7.10 的升级版,我使用瘦"作为我的开发服务器.当错误发生在其他地方时,我确实得到了正常的调试输出.
The Rails 3.2.2 app is an upgrade from 2.7.10, and I'm using "thin" as my development server. I do get normal debug output when the error occurs in other places.
我正在运行开发,正如您在此处看到的:
I'm running development, as you can see here:
=> Booting Thin
=> Rails 3.2.2 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
>> Thin web server (v1.3.1 codename Triple Espresso)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
我可以通过在控制器中引发异常来复制此行为.
I can duplicate this behavior by raising an exception in the controller.
推荐答案
请检查您的 development.rb 并确保
Please check you development.rb and ensure that
config.think_all_requests_local = true
否则不会显示异常和堆栈跟踪.
Otherwise exceptions and stack traces will not be shown.
这篇关于在开发模式下没有获得视图错误的调试输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!