Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rake aborted! ExecJS::RuntimeError: (execjs):1

I'm getting an error while precompiling on production server; however, if I set the environment as production and run the precompilation on the development computer, it runs ok. How can it be possible?

RAILS_ENV="production" bundle exec rake assets:precompile RAILS_GROUPS=assets

error returned:

   ...
   rake aborted!
   ExecJS::RuntimeError:
   (execjs):1
   ...

I have no clue whatsoever on where's the error coming from.

like image 508
Jorge Avatar asked Dec 07 '22 22:12

Jorge


2 Answers

I had the same problem and restarting the server it solve it.

EDIT

Also you can add swap. Here is a great tutorial https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04

like image 29
Panos Angel Avatar answered Dec 10 '22 11:12

Panos Angel


Simply: My production server was running out of RAM memory. I boosted it a little bit to 1GB and now it works like a charm!

like image 113
Jorge Avatar answered Dec 10 '22 12:12

Jorge