Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why would rake assets:precompile take forever?

Our RoR app uses quite a few assets that need to be precompiled. It usually took several minutes for assets:precompile to run.

However recently something very strange happened: simple rake assets:precompile never ends (waited few hours).

I've found a workaround:

rake assets:precompile --trace

However it would be great to fix it anyways. Any ideas about a reason?

like image 763
madutis Avatar asked Nov 14 '22 02:11

madutis


1 Answers

Does it take forever on your local machine or on the production server?

I had a similar thing when I deployed my app to a AWS micro instance. It took to much CPU and then AWS limits the cpu. See http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts_micro_instances.html

Now I precompile my assets locally and the problem is gone.

like image 115
JeroenKnoops Avatar answered Dec 16 '22 02:12

JeroenKnoops