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?

New Alexandria
  • 6,951
  • 4
  • 57
  • 77
simonmorley
  • 2,810
  • 4
  • 30
  • 61
  • Can you access http://yourhost.com/assets/application-4fac522109a7afaaa2f18ef9f1294e19.css ? – Frederick Cheung Feb 06 '12 at 16:17
  • Yup, that's the most frustrating thing. I can open the css and js files just fine. – simonmorley Feb 06 '12 at 16:33
  • Can I ask what version of Rails you are migrating from? – fatfrog Feb 09 '12 at 05:14
  • Not sure if this is the same problem: http://blog.nathanhumbert.com/2012/01/rails-32-development-environment-asset.html?m=1 – fatfrog Feb 09 '12 at 05: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. – simonmorley Feb 09 '12 at 09:51
  • Fixed a month later through trial and error. Full instructions [here...][1] [1]: http://stackoverflow.com/questions/9437452/rails-3-2-asset-pipeline-with-thin-and-apache-not-finding-assets/9457748#9457748 – simonmorley Mar 02 '12 at 16:12

1 Answers1

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.

loneaggie
  • 297
  • 2
  • 8
  • 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 – simonmorley Feb 06 '12 at 16:24
  • just to clarify, you can copy and paste the exact path into your browser and the file loads correctly? – loneaggie Feb 06 '12 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. – simonmorley Feb 06 '12 at 16:50