I'm experiencing this error when I launch Google Crawler on the site:
Error message:
ActionView::MissingTemplate: Missing template home/index, application/index with {:locale=>[:fr], :formats=>["image/*"], :handlers=>[:erb, :builder, :haml]}. Searched in: * "/home/custodir/apps/default/releases/32/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/ckeditor-4.0.10/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/rails_admin-0.4.9/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/kaminari-0.15.1/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/devise-2.1.4/app/views"
Research on SO:
I took note of these 3 related problems: ActionView::MissingTemplate -> I'm not using HAML
ActionView::MissingTemplate: Missing template -> Not related
Googlebot receiving missing template error for an existing template -> Tried the gem "rails_fix_google_bot_accept" no difference.
More Details:
Errbit says possible errors: 88.4%
ActionView::MissingTemplate: Missing template home/index, application/index with {:locale=>[:fr], :formats=>["image/*"], :handlers=>[:erb, :builder, :haml]}. Searched in: * "/home/custodir/apps/default/releases/30/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/ckeditor-4.0.10/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/rails_admin-0.4.9/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/kaminari-0.15.1/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/devise-2.1.4/app/views"
7.4%
ActionView::MissingTemplate: Missing template home/index, application/index with {:locale=>[:fr], :formats=>[:css], :handlers=>[:erb, :builder, :haml]}. Searched in: * "/home/custodir/apps/default/releases/30/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/ckeditor-4.0.10/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/rails_admin-0.4.9/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/kaminari-0.15.1/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/devise-2.1.4/app/views"
2.5%
ActionView::MissingTemplate: Missing template home/index, application/index with {:locale=>[:fr], :formats=>["image/*"], :handlers=>[:erb, :builder, :haml]}. Searched in: * "/home/custodir/apps/default/releases/32/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/ckeditor-4.0.10/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/rails_admin-0.4.9/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/kaminari-0.15.1/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/devise-2.1.4/app/views"
1.7%
ActionView::MissingTemplate: Missing template home/index, application/index with {:locale=>[:fr], :formats=>["image/*"], :handlers=>[:erb, :builder, :haml]}. Searched in: * "/home/custodir/apps/default/releases/24/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/ckeditor-4.0.10/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/rails_admin-0.4.9/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/kaminari-0.15.1/app/views" * "/home/custodir/apps/default/shared/bundle/ruby/2.0.0/gems/devise-2.1.4/app/views"
Full Backtrace: https://gist.github.com/YOUConsulting/a59e134a98b4d5bc1438
HTTP_ACCEPT:
image/*
HTTP_USER_AGENT:
Mozilla/5.0 (Windows NT 6.1; rv:6.0) Gecko/20110814 Firefox/6.0 Google favicon
Parameters:
{ "action" => "index", "controller" => "home" }
Update 1: Added HomeController Index
def index
@interest_groups = InterestGroup.all.sort_by &:position || [] # Category blocks
@special_interest_groups = SpecialInterestGroup.all || [] # Student block(s)
@hot_jobs = HotJob.all(api_params_for_user) || [] # Hot Jobs
@jobs_for_you = Job.jobs_for_you(api_params_for_user) || [] # Jobs for you
@applications = []
if current_user
@applications = Application.all_for_user_with_token(current_user.token).select{|a| a.visible?} # Applications
@user = current_user
@user.fetch_sap_data!
end
if params[:status] && params[:status] == '404'
@errors = I18n.t("home.errors.error_404")
@errors_long = I18n.t("home.errors.error_404_long")
@errors_extra = I18n.t("home.errors.error_404_extra")
elsif params[:status] && params[:status] == '422'
@errors = I18n.t("home.errors.error_422")
elsif params[:status] && params[:status] == '500'
@errors = I18n.t("home.errors.error_500")
end
end
Found the answers:
Bots are triggering page www.example.com/status=500 which was a page that triggered my HTTP 500 errors.
I found a better way of implementing my error pages now and this resolved my problem:
http://makandracards.com/makandra/12807-custom-error-pages-in-rails-3-2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With