文件资产指纹在 Rails 3.1 上未正确更新
在我的 Rails 3.1 应用程序中,在部署时,资产被编译并成功上传。
当我访问应用程序时,引用了 css 和 js 文件,但服务器返回 404。
<link href="/assets/application-f997bad128b3d8a92ed5619470851dab.css" media="screen" rel="stylesheet" type="text/css" />
<script src="/assets/application-d7eac22b3bc8b4e3620abb21f59a5faa.js" type="text/javascript"></script>
在服务器上查看,html 标记上打印的指纹不匹配,因此服务器返回 404。
但我想知道到底是怎么回事这种情况发生了。
那么,改变清单文件指纹的因素有哪些呢?
In my rails 3.1 app, while deploying, the assets is compiled and gets uploaded successfully.
When I visit the app, the css and js files are referenced but the server give back 404.
<link href="/assets/application-f997bad128b3d8a92ed5619470851dab.css" media="screen" rel="stylesheet" type="text/css" />
<script src="/assets/application-d7eac22b3bc8b4e3620abb21f59a5faa.js" type="text/javascript"></script>
Looking on the server, the fingerprint that is printed on the html markup doesn't match so the server returns 404.
But I wonder how the hell this happens.
So, what are the factors that change the fingerprinting of the manifest files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许您的服务器没有重新加载。当 Unicorn 在向进程发送
USR2
信号后没有切换时,我遇到了这个问题。我必须手动终止并重新启动该进程才能使其再次运行。Maybe your server wasn't reloaded. I've experienced this issue when Unicorn didn't switch over after sending the
USR2
signal to the process. I had to manually kill and restart the process to get it going again.