预编译资产未在部署到AWS弹性beanstalk的rails app中加载

时间:2017-06-04 06:25:01

标签: ruby-on-rails amazon-web-services nginx elastic-beanstalk

这是一个与在AWS弹性beanstalk上部署rails应用程序有关的问题。当我在控制台中输入eb logs时,我在/var/log/nginx/error.log下会收到以下错误: -

2017/06/04 06:02:08 [error] 31759#0:
*1 open()"/var/app/current/public/assets/trumbowyg.min.css" failed
(2: No such file or directory), client: 172.31.79.121, server: _, 
request: "GET /assets/trumbowyg.min.css HTTP/1.1",
host: "kanttly-dev.kfzi8ynhke.us-east-1.elasticbeanstalk.com", 
referrer: "http://kanttly-dev.kfzi8ynhke.us-east1.elasticbeanstalk.com/"

但是,当我eb sshcd /var/app/current/public/assets/ && ls时,我可以看到目录中的预编译文件。

trumbowyg.min-65157a3a7fa7c31aa4e2b9e7036c1e389339f4f7964eece797770708df9d2ca1.css

如果有人可以向我解释问题是什么,我会很高兴,因为资产(trumbowyg.min.css)已经预编译,以及如何加载预编译资产。谢谢!

0 个答案:

没有答案