Adam Wilson
2009-Aug-11 23:54 UTC
weird problem after deploy: application.html.erb does not lo
I am having a weird problem: Just deployed an updated app to test on my server. For some reason it does not load my layout, but some other default layout, which looks like the below. I dont know where this layout is kept.. Its for sure not in my layouts folder! Its weird as on my local machine it works fine.. but on the server I get this strange behaviour. Rails version is 2.3.3. Any clues much appreciated! Thanks <html> <head> <title>[my app title]</title> <link type="text/css" rel="stylesheet" media="screen" href="/stylesheets/global.css"> </link> <script type="text/javascript" src="/javascripts/custom.js"> </script> <script type="text/javascript" src="/javascripts/prototype.js?1249952923"> </script> <script type="text/javascript" src="/javascripts/effects.js?1249952923"> </script> </head> <body> <div id="header"> <p>Header</p> </div> <div id="content"> [my pages] </div> <div id="footer"> </div> </body> </html> -- Posted via http://www.ruby-forum.com/.
Adam Wilson
2009-Aug-12 22:05 UTC
Re: weird problem after deploy: application.html.erb does not lo
Anyone...? Excuse the bump... I am just a bit baffled by this one! Thx Adam Wilson wrote:> I am having a weird problem: > > Just deployed an updated app to test on my server. > For some reason it does not load my layout, but some other default > layout, which looks like the below. I dont know where this layout is > kept.. Its for sure not in my layouts folder! > Its weird as on my local machine it works fine.. but on the server I get > this strange behaviour. Rails version is 2.3.3. > > Any clues much appreciated! > > Thanks-- Posted via http://www.ruby-forum.com/.
Marnen Laibow-Koser
2009-Aug-12 22:47 UTC
Re: weird problem after deploy: application.html.erb does not lo
Adam Wilson wrote:> Anyone...? > > Excuse the bump... I am just a bit baffled by this one! > ThxYou couldn''t even wait 24 hours before bumping? That just makes us less likely to want to bother to help you. Patience, grasshopper... :) Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
Alpha Blue
2009-Aug-12 23:03 UTC
Re: weird problem after deploy: application.html.erb does not lo
A couple of things here. First, it''s probably something simple. I''d make sure that your deployment folder layouts doesn''t contain it there. Secondly, if you have a file that is mapped to root, check the views in that folder for index to see if it''s in there. Third, have you mapped anything for root in routes that points to some controller/view? As a side note, you are using multiple JS files in your layout, which makes more HTTP header requests. You might want to look into caching your javascript and css files or using the Asset Packager plugin. My thoughts. -- Posted via http://www.ruby-forum.com/.
Adam Wilson
2009-Aug-12 23:30 UTC
Re: weird problem after deploy: application.html.erb does not lo
OK Just worked it out: In my layouts folder I had an old file called application.html.erb.old - for some reason rails was using that instead of application.html.erb in the same folder. So I removed the old one. And then it threw an error saying it cannot find application.erb... So I renamed application.html.erb to application.erb, and voila problem solved! Strange huh? I thought it was using some default layout hidden somewhere.. but no it was right there in the layouts folder! (Rails is v2.3.3) -- Posted via http://www.ruby-forum.com/.