当我使用Rails 3和Slim时,所有的Slim语法错误都会在浏览器中显示,但当我迁移到Rails 4后,Slim语法错误只在控制台中显示。在浏览器中,我只看到HTTP 500错误和消息We're sorry, but something went wrong。如何在浏览器中显示语法错误?
例如,如何显示此错误而不是HTTP错误500:
例如,如何显示此错误而不是HTTP错误500:
Started GET "/tests" for 127.0.0.1 at 2014-01-09 14:44:55 +0400
Processing by TestsController#index as HTML
Rendered tests/index.html.slim within layouts/application (2.2ms)
Completed 500 Internal Server Error in 5ms
ActionView::Template::Error (Text line not indented deep enough.
The first text line defines the necessary text indentation.
Are you trying to nest a child tag in a tag containing text? Use | for the text block!
/Users/sergey-chechaev/rails/project/test_rails_4/app/views/tests/index.html.slim, Line 2, Column 1
p = week_field_tag :week
TestRails4::Application.configure do config.cache_classes = false config.eager_load = false config.consider_all_requests_local = true config.action_controller.perform_caching = false config.action_mailer.raise_delivery_errors = false config.active_support.deprecation = :log config.active_record.migration_error = :page_load config.assets.debug = true end
- Sergey Chechaev