To resolve this, simply add the following:
gem "execjs" gem "therubyracer"
on your Gemfile and run
This error seems to be happening on Ruby on Rails version 3 and above. This seems to solve the problem though some developers hate this approach of adding another gem on the dependency list. Not to mention that the "therubyracer" is discouraged by some developers since it takes up too much memory.
If you were previously using therubyracer or therubyracer-heroku, these gems are no longer required and strongly discouraged as these gems use a very large amount of memory.
- by Heroku