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

[my app title]

Header

[my pages]

Anyone…?

Excuse the bump… I am just a bit baffled by this one!
Thx

Adam W. 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

Adam W. wrote:

Anyone…?

Excuse the bump… I am just a bit baffled by this one!
Thx

You couldn’t even wait 24 hours before bumping? That just makes us less
likely to want to bother to help you. Patience, grasshopper… :slight_smile:

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

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)

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs