【发布时间】:2010-03-02 15:44:08
【问题描述】:
这可能很简单,但我不知道为什么我没有收到错误页面。
首先,我使用 Heroku 进行托管,所以它肯定处于生产模式。
如果我将“config.action_controller.consider_all_requests_local”行设置为 true,我会收到详细的错误消息,否则,我会收到一个完全 100% 的空白屏幕。如果我查看源代码,也是空白。
我所有的 404,422,500.html 文件都是公开的,我没有碰过它们。
如果我在那里以生产模式开始,它们似乎可以在我的本地机器上工作。所以它必须与Heroku有关?有什么想法吗?
日志没有告诉我任何有用的信息。
下面是production.rb文件的详细信息
config.cache_classes = true
#ActionMailer::Base.delivery_method = :sendmail
Paperclip.options[:command_path] = "/usr/bin/"
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
# set delivery method to :smtp, :sendmail or :test
config.action_mailer.delivery_method = :smtp
# Full error reports are disabled and caching is turned on
config.action_controller.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.action_view.cache_template_loading = true
【问题讨论】:
标签: ruby-on-rails http-status-code-404 heroku