Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rake assets precompile failed

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

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

like image 917
jasonlfunk Avatar asked Jun 28 '12 21:06

jasonlfunk


2 Answers

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.

like image 83
rubish Avatar answered Oct 16 '22 13:10

rubish


, but issue was resolvedI tried installing node.js first. And then, ran the following command bundle exec rake assets:precompile. Only then I didn't notice the error.

Initially, I thought it was because of low memory too. Cleaned almost all running applications, but couldn't find a solution. Plus, I opened Ruby as administrator. Not sure if that helped too, but issue was resolved.

like image 39
natnirus Avatar answered Oct 16 '22 13:10

natnirus