Rails 3.2 Asset Pipeline with Passenger Endless Errors

☆樱花仙子☆ 提交于 2019-12-11 08:22:59

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/9162378/rails-3-2-asset-pipeline-with-passenger-endless-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!