- We all know Rails 3.1 is rocking with jQuery, CoffeeScript by default.
- The rake utility won’t work if you create application with rails 3.1 error would be following type….
rake aborted!
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.
Solution
Step-1 To declare therubyracer gem in Gemfile of your application which is in application’s root directory.
gem ‘therubyracer’
Step-2 Then run bundle install command to install therubyracer gem.
$ bundle install
- Now above error will disapper.
Note:- If you create application with rails 3.1 with protopye javascript then therubyracer gem doesn’t require, but rails 3.1 uses CoffeeScript, jQuery by default. A JavaScript runtime is needed for Linux Ubuntu. It is not needed for Mac OS X or Windows.
Sorry, comments are closed for this article.