Missing template pages/layout only occasionally

I have my app email me errors when they occur. I get this about 2-3
times a week with thousands of hits a day to the site. pages/show is a
.html.erb file that renders the partial
_strategicrelationshipacademy.html.erb essentially. Or whatever partial
it calls for. I get this on many different 'pages'. Obviously the
partial exists if it renders it fine most of the time. What could cause
this?

Message = Missing template pages/layout with {:formats=>["text/*"],
:locale=>[:en, :en], :handlers=>[:rhtml, :rxml, :builder, :erb, :rjs]}
in view paths "/var/www/procyon-live/app/views",
"/var/www/procyon-live/vendor/plugins/wicked_pdf/app/views",
"/var/www/procyon-live/vendor/plugins/file_column/app/views",
"/var/www/procyon-live/vendor/plugins/acts_as_tree/app/views",
"/var/www/procyon-live/vendor/plugins/acts_as_list/app/views"

Request = {"controller"=>"pages",
"page"=>"strategicrelationshipacademy", "action"=>"show"}

/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.9.rc5/lib/action_view/paths.rb:15:in
`find'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.9.rc5/lib/action_view/lookup_context.rb:81:in
`find_template'
...
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.9.rc5/lib/action_controller/metal/instrumentation.rb:39:in
`render_without_wicked_pdf'
/var/www/procyon-live/vendor/plugins/wicked_pdf/lib/pdf_helper.rb:19:in
`render'
/var/www/procyon-live/app/controllers/pages_controller.rb:154:in `show'
...

Rails 3.0.9.rc5
Ruby 1.8.7

Obviously I didn't want to include the entire backtrace. Let me know if
it would help.

Thanks,
Rick

I have my app email me errors when they occur. I get this about 2-3
times a week with thousands of hits a day to the site. pages/show is a
.html.erb file that renders the partial
_strategicrelationshipacademy.html.erb essentially. Or whatever partial
it calls for. I get this on many different 'pages'. Obviously the
partial exists if it renders it fine most of the time. What could cause
this?

Message = Missing template pages/layout with {:formats=>["text/*"],
:locale=>[:en, :en], :handlers=>[:rhtml, :rxml, :builder, :erb, :rjs]}

I think it's looking for _partial.text.erb google for browsers that send you the text/* format.

Excellent suggestion. From the page view I see this agent:

Mozilla/5.0 (compatible; oBot/2.3.1; +http://filterdb.iss.net/crawler/)

So, how do I setup my app to only accept html requests for those routes?
Or, just not fail when it wants text?

Thanks

Excellent suggestion. From the page view I see this agent:

Mozilla/5.0 (compatible; oBot/2.3.1; +http://filterdb.iss.net/crawler/)

So, how do I setup my app to only accept html requests for those routes?
Or, just not fail when it wants text?

try passing a formats option to render.

render partial: 'foo', formats: [:html]

I finally figured this out. I have an action that only renders html,
but googlebot for instance asks for text format. So, it tries to find
action.text.erb which doesn't exist.

I added this to my controller and everything works now.

before_filter :force_html_requests, :only => :show

def force_html_requests
  request.format = :html
end