![](/img/trans.png)
[英]rails app strange error, no trace, no log output help please seriously issue " !! Unexpected error while processing request:
[英]How do I get a full stack trace instead of “Unexpected error while processing request” in Rails test environment?
在測試環境( rails s -e test
)中啟動我的Rails服務器時,某些東西正在搶救異常並輸出“處理請求時出現意外錯誤:...此處錯誤...”。 我在開發模式中得到了回溯。
是誰,如何禁用它? 我需要完整的回溯,而不僅僅是引發的錯誤!
我正在使用Rails 3.2.3,Ruby 1.9.3,rspec,capybara,capybara-webkit
在test.rb
設置config.action_dispatch.show_exceptions = true
對我test.rb
。
閱讀由Cucumber創建的env.rb
:
# By default, any exception happening in your Rails application will bubble up
# to Cucumber so that your scenario will fail. This is a different from how
# your application behaves in the production environment, where an error page will
# be rendered instead.
...
# 1) Tag your scenario (or feature) with @allow-rescue
# 2) Set the value below to true. Beware that doing this globally is not
# recommended as it will mask a lot of errors for you!
摘要:
@allow-rescue
Feature: blah blah blah
會成功的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.