【发布时间】:2012-12-05 01:43:27
【问题描述】:
我的 rails 应用程序使用名为“four_oh_four”的路由来提供自定义 404 页面,该页面使用网站的应用程序布局看起来不错。
我开始收到以下错误:
Missing template info/four_oh_four with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], :formats=>["image/jpeg", "image/pjpeg", "image/png", "image/gif"], :locale=>[:en, :en]}
我似乎无法弄清楚我需要做什么来解决这个问题。有什么想法吗?
这是控制器的样子(真的没有):
def four_oh_four
end
这是 routes.rb:
match 'four_oh_four' => 'info#four_oh_four', :as => :four_oh_four
...
# Catch 404s
match '*path' => 'info#four_oh_four', :status => 404
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-3 ruby-on-rails-3.1 routes handlers