I''ve stumbled upon a very weird bug which I''m -- sadly -- unable to reproduce. I''m riding the edge and, after upgrading once more (after recent localized template neatness), one of my coworkers who is using Mongrel reported that the site has no layout. This bug was not reproducable with Passenger or Thin. The layout was in Haml ("application.html.haml"). I''ve set up a blank app to use edge rails and created a scaffold with an erb layout ("application.html.erb"). The first requests indeed didn''t render a layout! Then I started to git bisect vendored rails. I started off with a fairly old revision and the template immediately showed on the next request. I continued to bisect and finished up on this commit: "a98cd7ca by Joshua Peek: Add localized templates". The thing that troubled me now was that even with this commit checked out, I couldn''t reproduce the bug. The layout rendered consistently. I then moved back to master and, to my surprise, the bug was gone. Not reproducable anymore. I went back to the real application in question and there it was gone, too. So, doctor, give to me straight: am I crazy? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
I''m not crazy! Turned out that "script/server --daemon" + Mongrel + Josh Peek = no layout for you, buddy. Bisected right down to: 858a420c by Joshua Peek: "Ensure the template format is always passed to the template finder. Now we can cleanup some nasty stuff." Funny that it doesn''t occur with Mongrel that isn''t daemonized. On Tue, Jan 27, 2009 at 04:08, Mislav Marohnić <mislav.marohnic@gmail.com>wrote:> I''ve stumbled upon a very weird bug which I''m -- sadly -- unable to > reproduce.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
LOL Any possible way to create a unit test for this? I may end up just reverting that commit. On Jan 26, 9:31 pm, Mislav Marohnić <mislav.maroh...@gmail.com> wrote:> I''m not crazy! > > Turned out that "script/server --daemon" + Mongrel + Josh Peek = no layout > for you, buddy. > > Bisected right down to: 858a420c by Joshua Peek: "Ensure the template format > is always passed to the template finder. Now we can cleanup some nasty > stuff." > > Funny that it doesn''t occur with Mongrel that isn''t daemonized. > > On Tue, Jan 27, 2009 at 04:08, Mislav Marohnić <mislav.maroh...@gmail.com>wrote: > > > I''ve stumbled upon a very weird bug which I''m -- sadly -- unable to > > reproduce.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On Tue, Jan 27, 2009 at 06:33, Joshua Peek <josh@joshpeek.com> wrote:> > LOL > > Any possible way to create a unit test for this?Ticket with fix here: http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1803-detached-mongrel-server-renders-no-layout I failed at creating a unit test. First of all, some tests error out if run individually and layout tests are one of them. Second, it''s really difficult to simulate a detached Mongrel simply because of the way this whole template thing bootstraps. But I would suggest an all-around solution: no relative directory paths anywhere. Ever. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---