1

At windows platform I am trying to run one of my application but at console it is giving some strange issue.

Issue : C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/execjs-1.4.0/lib/execjs/run times.rb:51:in `autodetect': Could not find a JavaScript runtime. Seehttps://github.com/sstephenson/execjs for a list of available runtimes.

I have not added execjs gem in my Gemfile but even though it is showing the name of gem in list. Even though I tried my uninstalling it but again while running bundle install , it again appears. Just because of that, I am unable to run the console.

Thanks in advance.

Rubyist
  • 6,486
  • 10
  • 51
  • 86
  • You might need to install [Node.js](http://nodejs.org/) or any other of the [listed javascript runtimes](https://github.com/sstephenson/execjs). – Thomas Klemm Mar 18 '13 at 09:47

2 Answers2

1

Atlast after a lot of Googling, I found that due to some dependencies execjs get installed. While bundle install, due to sprockets dependencies execjs get loaded in the machine.

Step 1 : Delete the folder 'execjs-1.4.0' from C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems

Step 2 : Remove dependency ( sprockets gem ) from the system by using gem uninstall.

Step 3 : Delete the Gemfile.lock and Run Bundle Install

In this way, issue is resolved at my machine. Thanks a lot Thomas for your valuable suggestion.

UPDATE : 26 March 2013

Refer this link for the installation of NODE.JS -> Click Here

Community
  • 1
  • 1
Rubyist
  • 6,486
  • 10
  • 51
  • 86
0

Add this line to Gemfile

gem 'therubyracer'

Then run bundle install