I have a couple of sites that are set up in the same way (rails 3.1.3)
as far as I can tell. One of them serves up the assets (js and css)
fine in production the other doesn’t.
Both sites have this in their application.html.erb
Both sites work fine in development but when they run in production
the working site looks like this…
and the broken site looks like this…
Now I can just insert the correct lines into the application.html.erb
file and things work fine but I would like to know how this should
really be handled.
Does anyone know which configuration option I have overlooked to make
this work?
On Mon, Feb 20, 2012 at 11:31 AM, Peter H. < [email protected]> wrote:
the working site looks like this…
What is the exact error message you get in the log file ?
Now I can just insert the correct lines into the application.html.erb
file and things work fine but I would like to know how this should
really be handled.
Does anyone know which configuration option I have overlooked to make this
work?
Well, I could kind of reproduce this issue by abusing the
config/environments/production.rb with this diff:
NOT ADVISED for real usage, just for testing …
(really don’t do this, it will poisen caches for the
lifetime that is set for the assets)
@@ -15,10 +15,10 @@ …::Application.configure do
config.assets.compress = true
Don’t fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = false
config.assets.compile = true # false
Generate digests for assets URLs
config.assets.digest = true
config.assets.digest = false # true
I presume the config.assets.digest would be the critical
difference here as setting it to false turns off the addition
of the digests to the pre-compiled assets.
Did you diff the config/environments/production.rb on your
2 systems?
Did you diff the public/assets/manifest.yml on the 2 systems?