Reputation: 1068
Last night I got an exception on my website caused by a request with agent:googlebot.
HomeController# (ActionView::MissingTemplate) "Missing template home/index with {:formats=>[:\"\\\"*/*\\\"\"], :locale=>[:en, :en], :handlers=>[:haml, :rjs, :rhtml, :builder, :rxml, :erb]} in view paths \"/disk1/home/slugs/302902_9453ada_84cd/mnt/app/view
I don't understand what it means. It seems like the weird thing is the format. Anyone experienced something similar?
Thanks.
Upvotes: 5
Views: 475
Reputation: 40437
In my case renaming my static pages (served by my PagesController) from index.erb.html
to index.en.erb.html
fixed it.
Upvotes: 0
Reputation: 5528
It usually means that somebody used the page, Google flagged it, and began crawling it. Missing template suggests you have a GET request that ordinarily responds only to xhr or js requests but Google is making a plain old html request, and your controller doesn't know what to do with it.
Usual responses are: 1. Handle the html version of the action. 2. If you don't want googlebot crawling that URL, add it to your robots.txt file. 3. If the action it is crawling is usually the target of a form submission and google is crawling it, make sure in the routes that it only responds to the appropriate http method.
Upvotes: 3