1

Having recently migrated my app to 3.2.1, it would seem I'm another developer struggling with the asset pipeline.

Everything looks ok, my assets are compiled and apparently served. In the source of my doc I can see this:

 <link href="/assets/application-4fac522109a7afaaa2f18ef9f1294e19.css" media="screen" rel="stylesheet" type="text/css" />

And the link works just fine. However, neither my js or css actually load.

The only error I can actually see in the apache logs is this:

 cache: [GET /] miss

I have adjusted my apache configuration to include:

 XSendFile On
 ...
 <LocationMatch "^/assets/.*$"> 
    Header unset Last-Modified
    Header unset ETag 
    FileETag None   
    ExpiresActive On
    ExpiresDefault "access plus 1 year"
 </LocationMatch>

Am deploying with capistrano and passenger.

Has anyone out there run into this issue?

6
  • Can you access yourhost.com/assets/… ? Feb 6, 2012 at 16:17
  • Yup, that's the most frustrating thing. I can open the css and js files just fine. Feb 6, 2012 at 16:33
  • Can I ask what version of Rails you are migrating from?
    – fatfrog
    Feb 9, 2012 at 5:14
  • Not sure if this is the same problem: blog.nathanhumbert.com/2012/01/…
    – fatfrog
    Feb 9, 2012 at 5:24
  • Thanks for the comment. I think it was actually an issue with 1.9.3-p0. After rolling back to 1.9.2-p280 and recreating the stylesheets, life's better. Although I am still not confident I've fixed it... Ran into issues again yesterday. Feb 9, 2012 at 9:51

1 Answer 1

0

Always make sure you wipe out /your_app_path/tmp/cache. I usually wipe out the public/assets also. Then do a compile and restart the app. Many times this solves odd issues with the pipeline for me.

3
  • yeah, tried both of those. I can't see why I can open application.css in browser and yet it's not actually loaded... crazy Feb 6, 2012 at 16:24
  • just to clarify, you can copy and paste the exact path into your browser and the file loads correctly?
    – loneaggie
    Feb 6, 2012 at 16:37
  • That's correct. Both js and css are accessible in /assets/application.... No errors in firebug either. The application css contains all the required styles. And yet the pages load with no styling. Feb 6, 2012 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.