This gem fixes the ActionView::MissingTemplate
error generated by Rails when a page is requested with the header Accept: */*;q=0.9
(or any other number).
The Google bot does such requests.
Add this line to your application's Gemfile:
gem 'rails_fix_google_bot_accept'
And then execute:
$ bundle
That's it.
The gem is based on this gist: https://gist.github.com/2590040/93cb2faca1ba5ead73222e74ca11790e3efb22de
It was made by Romain Champourlier as an answer to this question: http://stackoverflow.com/questions/8881756/googlebot-receiving-missing-template-error-for-an-existing-template
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request