小编MPa*_*ons的帖子

Rails 4异常堆栈跟踪在开发中不显示

当我按照教程时,我正在关注rails教程书并使用c9.io web IDE.在处理我的示例应用程序时,我注意到在开发模式下页面上没有显示异常.此外,异常堆栈跟踪也未记录log/development.log.这种困境使得我的代码中的错误调试变得困难.

应用程序出错 在此输入图像描述

错误 development.log

Completed 500 Internal Server Error in 116ms (ActiveRecord: 2.3ms)
Run Code Online (Sandbox Code Playgroud)

我已经尝试/研究过的

  • config.log_level = :debug (在config/environments/development.rb中)
  • config.consider_all_requests_local = true
  • 这个
  • 另一个

配置/环境/ development.rb

Rails.application.configure do
  # Settings specified here will take precedence over those in config/application.rb.

  # In the development environment your application's code is reloaded on
  # every request. This slows down response time but is perfect for development
  # since you don't have to restart the web server …
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails exception ruby-on-rails-4

11
推荐指数
3
解决办法
3070
查看次数

标签 统计

exception ×1

ruby-on-rails ×1

ruby-on-rails-4 ×1