Rails 3.2 资产管道与乘客无休无止的错误
最近将我的应用程序迁移到 3.2.1,我似乎是另一位在资产管道中苦苦挣扎的开发人员。
一切看起来都不错,我的资产已编译并显然已投入使用。在我的文档的源代码中,我可以看到这一点:
<link href="/assets/application-4fac522109a7afaaa2f18ef9f1294e19.css" media="screen" rel="stylesheet" type="text/css" />
并且该链接工作得很好。但是,我的 js 或 css 都没有实际加载。
我在 apache 日志中实际看到的唯一错误是:
cache: [GET /] miss
我已调整我的 apache 配置以包括:
XSendFile On
...
<LocationMatch "^/assets/.*$">
Header unset Last-Modified
Header unset ETag
FileETag None
ExpiresActive On
ExpiresDefault "access plus 1 year"
</LocationMatch>
正在使用 capistrano 和乘客进行部署。
有人遇到过这个问题吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
始终确保清除 /your_app_path/tmp/cache。我通常也会消灭公共/资产。然后进行编译并重新启动应用程序。很多时候,这为我解决了管道的奇怪问题。
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.