耙式资产预编译失败 [英] rake assets precompile failed

查看:57
本文介绍了耙式资产预编译失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行 bundle exec rake asset:precompile --trace 时,我的预编译失败,但是看不到任何具体原因。

When I run bundle exec rake assets:precompile --trace, my precompilation fails but I cannot see any specific reason for it.

关于我的输出,请参见以下pastebin: http://pastebin.com/zggZyPyM

See this pastebin for my output: http://pastebin.com/zggZyPyM

推荐答案

预编译资源占用大量内存。我的情况是〜= 400mb。由于过多的内存使用,OS可能会终止该进程。您可以检查系统日志以验证是否是这种情况。

Precompiling assets takes a lot of memory. ~=400mb in my case. It might be possible that OS is killing of the process due to excessive memory usage. You can check the syslog to verify if that is the case.

您可以增加服务器的内存来避免这种情况。如果无法做到这一点,我建议您在本地系统上预编译资产,将其提交到存储库并部署到服务器。这样,您就不必在服务器上编译资产。但是,您可能希望研究以某种方式删除先前生成的资产并使流程自动化的方法。

You can increase the memory of your server to avoid the situation. If that is not possible, I would suggest that you precompile assets on your local system, commit them to the repo and deploy to the server. That way you wouldn't have to compile assets on your server. However you might want to look into ways to delete the previously generated assets somehow and also automate the process.

这篇关于耙式资产预编译失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆