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 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Sent from my iPhone On 27/11/2012, at 2:52 AM, Rick Cockerham <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 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.> 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 > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
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 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Jim Ruther Nill
2012-Nov-27 00:00 UTC
Re: Re: Missing template pages/layout only occasionally
On Tue, Nov 27, 2012 at 7:54 AM, Rick Cockerham <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote:> 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]> > Thanks > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- ------------------------------------------------------------- visit my blog at http://jimlabs.heroku.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
I finally figured this out. I have an action that only renders html, but googlebot for instance wants text. So, I added this to the controller and everything works! before_filter :force_html_requests, :only => :show def force_html_requests request.format = :html end Rick On Monday, November 26, 2012 6:01:19 PM UTC-6, jim wrote:> > > > > On Tue, Nov 27, 2012 at 7:54 AM, Rick Cockerham <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org<javascript:> > > wrote: > >> 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] > > >> >> Thanks >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonra...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<javascript:> >> . >> To unsubscribe from this group, send email to >> rubyonrails-ta...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > -- > ------------------------------------------------------------- > visit my blog at http://jimlabs.heroku.com >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/GjeWL-1w3bMJ. For more options, visit https://groups.google.com/groups/opt_out.
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 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.