Hello, For those of you who have solved the learning hurdle of rails deployment, all I can say is congratulations! I''m struggling, frustrated that my app, which runs so well on my linux box, generates such odd errors on my vps and completely fails to do anything. For example, at the moment my production.log file has the error: ActionController::RoutingError (No route matches "/favicon.ico" with {:method=>:get}): Sometimes instead of favicon it complains of robots.txt. Well, nowhere in my code -- that I can find -- it there any refernece to either, yet here I sit, looking at a blank screen, and trading the occasional email with the sysadmin. Errors like this drive me nuts. thanks - James -- 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.
On Jan 7, 3:20 am, James Gaston <jrgas...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello, > > For those of you who have solved the learning hurdle of rails deployment, > all I can say is congratulations! I''m struggling, frustrated that my app, > which runs so well on my linux box, generates such odd errors on my vps and > completely fails to do anything. For example, at the moment my > production.log file has the error: > > ActionController::RoutingError (No route matches "/favicon.ico" with > {:method=>:get}):That particular error is a red herring - it means someone requested a file that doesn''t exist. A favicon is the icon that appears to the left of the url bar in the browser, when a browser visits your site it will automatically request that file. Similarly, robots.txt contains instructions for bots crawling your site, so they automatically request it. Neither of these two will actually impact your site. What else is happening? Fred> > Sometimes instead of favicon it complains of robots.txt. Well, nowhere in my > code -- that I can find -- it there any refernece to either, yet here I sit, > looking at a blank screen, and trading the occasional email with the > sysadmin. > > Errors like this drive me nuts. > > thanks > - James-- 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.
Fred, Thanks. Yes, I know all of that, so that is why these errors seem so odd. On Fri, Jan 7, 2011 at 4:33 AM, Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Jan 7, 3:20 am, James Gaston <jrgas...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hello, > > > > For those of you who have solved the learning hurdle of rails deployment, > > all I can say is congratulations! I''m struggling, frustrated that my app, > > which runs so well on my linux box, generates such odd errors on my vps > and > > completely fails to do anything. For example, at the moment my > > production.log file has the error: > > > > ActionController::RoutingError (No route matches "/favicon.ico" > with > > {:method=>:get}): > > That particular error is a red herring - it means someone requested a > file that doesn''t exist. A favicon is the icon that appears to the > left of the url bar in the browser, when a browser visits your site it > will automatically request that file. Similarly, robots.txt contains > instructions for bots crawling your site, so they automatically > request it. Neither of these two will actually impact your site. What > else is happening? > > Fred > > > > Sometimes instead of favicon it complains of robots.txt. Well, nowhere in > my > > code -- that I can find -- it there any refernece to either, yet here I > sit, > > looking at a blank screen, and trading the occasional email with the > > sysadmin. > > > > Errors like this drive me nuts. > > > > thanks > > - James > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Please quote when replying. James Gaston wrote in post #973140:> Fred, > Thanks. Yes, I know all of that, so that is why these errors seem so > odd.Actually, the errors make a lot of sense. Browsers tend to request favicon.ico automatically. If it''s not there, no harm done. Likewise with robots.txt being automatically requested by search crawlers. In neither case should you worry in the slightest.> > On Fri, Jan 7, 2011 at 4:33 AM, Frederick Cheung > <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.orgBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org Sent from my iPhone -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi All, I''m working with an API that returns me a collection of locations as a hash. I could just display things like @places[:feature][:name] etc, but that seems pretty ugly (and brittle) to me. So I''m tempted to have a non-AR, non-persisted model class called Place. If I was writing this in Groovy I''d probably create a static method on Place - maybe loadPlaces(hash: placeHash) that would return a collection of place objects. What would be the idiomatic Rails/Ruby approach to something like this? Would I just change the capitalization to have a Place.load_places(place_hash) method :) or would there be a more Ruby/Rails way of solving the problem? Any input appreciated! Best Wishes, Peter -- 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.
On 7 January 2011 17:39, Peter Bell <peter-AS9tOuWgs4cAvxtiuMwx3w@public.gmane.org> wrote:> Hi All, > > I''m working with an API that returns me a collection of locations as a hash. I could just display things like @places[:feature][:name] etc, but that seems pretty ugly (and brittle) to me.I don''t quite understand what you mean by a collection of locations. Is that an array of hashes? Can you explain the data structure in more detail?> > So I''m tempted to have a non-AR, non-persisted model class called Place. > > If I was writing this in Groovy I''d probably create a static method on Place - maybe loadPlaces(hash: placeHash) that would return a collection of place objects. > > What would be the idiomatic Rails/Ruby approach to something like this? Would I just change the capitalization to have a Place.load_places(place_hash) method :) or would there be a more Ruby/Rails way of solving the problem?Why are you passing a hash to load_places? Colin -- 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.