ActionView::MissingTemplate: Missing template

后端 未结 2 488
太阳男子
太阳男子 2021-01-18 23:02

I\'m getting this error message when a google bot tries to visit one of my controllers.

ActionView::MissingTemplate: Missing template channels/show, applicat         


        
相关标签:
2条回答
  • 2021-01-18 23:14

    This has been recently fixed in master and back-ported to 3.2 branch: See https://github.com/rails/rails/issues/736 for the original bug report, https://gist.github.com/1754727 for monkey patches and github.com/rails/rails/pull/4918 for accepted pull request.

    0 讨论(0)
  • 2021-01-18 23:16

    I have seen this error as well on a Rails 3 app and have been in same boat about replicating the error. The log has the Missing Template error, but when I manually try the request, it works fine.

    I suspect that the HTTP request from Google is not setting a mime that Rails is processing correctly. The crude solution I found is to remove the view template mime, so

    example/index.html.erb
    

    is now

    example/index.erb
    

    This stops the Missing Template error, since the template will be used for all mimes.

    0 讨论(0)
提交回复
热议问题