Error when running rails app - ExecJS::RuntimeError

you have to install an additional gem for javascript. edit gemfile and add gem 'therubyracer'. You can then run bundle to install the new gem.

here is your solution in detail: http://www.railszilla.com/2011/12/rails-3-coffescript-execjs/


It happened to me too! You need to install "nodejs". As I work with Ubuntu Linux I did:

apt-get install nodejs 

Source: http://forums.pragprog.com/forums/148/topics/9665#posts-26576 (Sam Ruby's post)


If you are having this problem in production server this might be due to memory usage. while doing assets precompilation server use lot of memory.

consider restarting your production server.