Paul
2011-May-13 15:23 UTC
Robot causing MissingTemplate by sending :formats=>["text/*"], :locale=>[:en, :en]
Our production site occasionally gets the following error, which sends everyone on the team an email: Started GET "/" for 64.214.53.2 at 2011-05-13 10:53:16 -0400 Processing by HomeController#index as etc... ActionView::MissingTemplate (Missing template home/index with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], :formats=>["text/*"], :locale=>[:en, :en]} in view paths "etc...") Of course, if you browse to that page it comes up fine. I have two questions: 1) How can I reproduce this? Is there some way I can request the page, either through a browser or with curl or something else, that would set the request headers in a way that would trigger this error? 2) How do I fix this? I''ve googled around and the suggestion seems to be to create another view with ".en" in the file name. That seems really wrong to me. Thanks for any insight about what is going on. The server is CentOS, with Apache and Passenger. The app is Rails 3 and has happened with a few versions: 3.0.3, 3.0.5, and 3.0.7. The app is fairly old, but I think I created a blank project in Rails 3.0 beta, then dragged all my old code to the new project. -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Umberto
2011-May-24 08:40 UTC
Re: Robot causing MissingTemplate by sending :formats=>["text/*"], :locale=>[:en, :en]
I''ve got the same problem. Maybe a before_filter method could solve it? See: http://stackoverflow.com/questions/5557010/missing-template-blogs-index-on-ruby-on-rails-project But this seems to be limited to controllers who don''t respont to different formats. On May 13, 5:23 pm, Paul <p...-mzPrHiy5csbYtjvyW6yDsg@public.gmane.org> wrote:> Our production site occasionally gets the following error, which sends > everyone on the team an email: > > Started GET "/" for 64.214.53.2 at 2011-05-13 10:53:16 -0400 > Processing by HomeController#index as > etc... > ActionView::MissingTemplate (Missing template home/index with > {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], > :formats=>["text/*"], :locale=>[:en, :en]} in view paths "etc...") > > Of course, if you browse to that page it comes up fine. I have two questions: > > 1) How can I reproduce this? Is there some way I can request the page, > either through a browser or with curl or something else, that would > set the request headers in a way that would trigger this error? > > 2) How do I fix this? I''ve googled around and the suggestion seems to > be to create another view with ".en" in the file name. That seems > really wrong to me. > > Thanks for any insight about what is going on. The server is CentOS, > with Apache and Passenger. The app is Rails 3 and has happened with a > few versions: 3.0.3, 3.0.5, and 3.0.7. The app is fairly old, but I > think I created a blank project in Rails 3.0 beta, then dragged all my > old code to the new project.-- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Paul
2011-May-26 13:56 UTC
Re: Re: Robot causing MissingTemplate by sending :formats=>["text/*"], :locale=>[:en, :en]
"But this seems to be limited to controllers who don''t respond to different formats." That sounds like a clue. These actions don''t. I''ll put this at the bottom of the controllers and see if that helps: respond_to do |format| format.html end On Tue, May 24, 2011 at 4:40 AM, Umberto <hubert.alfred.studer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''ve got the same problem. Maybe a before_filter method could solve > it? See: > http://stackoverflow.com/questions/5557010/missing-template-blogs-index-on-ruby-on-rails-project > > But this seems to be limited to controllers who don''t respont to > different formats. > > On May 13, 5:23 pm, Paul <p...-mzPrHiy5csbYtjvyW6yDsg@public.gmane.org> wrote: >> Our production site occasionally gets the following error, which sends >> everyone on the team an email: >> >> Started GET "/" for 64.214.53.2 at 2011-05-13 10:53:16 -0400 >> Processing by HomeController#index as >> etc... >> ActionView::MissingTemplate (Missing template home/index with >> {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], >> :formats=>["text/*"], :locale=>[:en, :en]} in view paths "etc...") >> >> Of course, if you browse to that page it comes up fine. I have two questions: >> >> 1) How can I reproduce this? Is there some way I can request the page, >> either through a browser or with curl or something else, that would >> set the request headers in a way that would trigger this error? >> >> 2) How do I fix this? I''ve googled around and the suggestion seems to >> be to create another view with ".en" in the file name. That seems >> really wrong to me. >> >> Thanks for any insight about what is going on. The server is CentOS, >> with Apache and Passenger. The app is Rails 3 and has happened with a >> few versions: 3.0.3, 3.0.5, and 3.0.7. The app is fairly old, but I >> think I created a blank project in Rails 3.0 beta, then dragged all my >> old code to the new project. > > -- > 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@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.