config.consider_all_requests_local设置为true而没有完整跟踪

时间:2012-09-18 16:21:07

标签: ruby-on-rails

我今天正在开发一款新应用,这是我的 Gemfile

source 'https://rubygems.org'

gem 'rails', '3.2.8'

# Static pages
gem 'high_voltage', '0.9.2'

# Dry Controller
gem 'coast'

# Light Views
gem 'slim'
gem 'formtastic'

# Uploading
gem 'paperclip'

# Authentication
gem 'devise'
gem 'cancan'

# Easing models
gem 'enumerize'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'uglifier', '>= 1.0.3'
end
group :test, :development do
  gem 'sqlite3'
  gem 'awesome_print'
  # For slim genetaror instead default
  gem 'slim-rails'
  gem 'factory_girl_rails', '~> 4.0'
  gem 'forgery'
end

gem 'jquery-rails'

这是我 environment / development.rb 的摘录:

config.cache_classes = false
config.whiny_nils = true
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.action_dispatch.best_standards_support = :builtin
config.active_record.mass_assignment_sanitizer = :strict
config.active_record.auto_explain_threshold_in_seconds = 0.5
config.assets.compress = false
config.assets.debug = true

Slim::Engine.set_default_options pretty: true, sort_attrs: false

当我转到有错误的页面时,例如这个:

p
  = @project.envelopedd

我得到500页错误而不是正常的调试跟踪。有什么想法解决这个问题?

1 个答案:

答案 0 :(得分:0)

这是Rails文档中的“错误”。我刚才也被这个事烧死了。 Rails仓库上有一个PR公开版来解决文档问题。

TL; DR:您需要实现show_detailed_exceptions?而不是local_request?