以下link_to 在我的landings/index.html.erb 中。该链接正确显示在登录页面上,当我单击它显示的链接时:
 ActionView::MissingTemplate (Missing template landings/faq, application/faq with
 Searched in:   * "/app/app/views"
登陆/index.html.erb
 <%= link_to "Learn more by reading our Frequently Asked Questions", faq_path %>
着陆控制器 app/controllers/landings_controller.rb
 class LandingsController < ApplicationController
    def about
    end
    def contact
    end
    def faq
    end
    def terms
    end
    def privacy 
    end
    def blog
    end
  end
路线.rb
 root :to => "landings#index"
  match '/about',    to: 'landings#about'
  match '/contact',  to: 'landings#contact'
  match '/faq',      to: 'landings#faq'
  match '/terms',    to: 'landings#terms'
  match '/privacy',  to: 'landings#privacy'
  match '/blog',     to: 'landings#blog'
about 和 contact 的路线都可以正常工作,我将在下面说明我如何称呼它们。只是faq视图找不到,我也将视图在哪里。(该链接确实在我的 localhost 环境中找到了视图,而不是在生产环境中)我正在使用 Heroku 部署我的应用程序。
views/landings/faq.html.erb 确实存在