ruby-on-railsrubynode.jsexecjs

ExecJS::RuntimeError [Rails 4] Node.js already installed


I have an ExecJS::RuntimeError on my Rails 4 app. I'm on Windows 7 64bit. I have already checked these two answers :

ExecJS::RuntimeError in Rails 3

and ExecJS::RuntimeError on Windows trying to follow rubytutorial

Then, I tried :

Install node.js, restard my computer, but still doesn't work !!

OR

Modify C:\RailsInstaller\Ruby2.0.0\lib\ruby\gems\2.0.0\gems\execjs-2.0.2\lib\execjs\runtimes.rb by changing.

 JScript = ExternalRuntime.new(
          :name        => "JScript",
          :command     => "cscript //E:jscript //Nologo",
          :runner_path => ExecJS.root + "/support/jscript_runner.js",
          :encoding    => 'UTF-8' # CScript with //U returns UTF-16LE
        )

by

JScript = ExternalRuntime.new(
      :name        => "JScript",
      :command     => "cscript //E:jscript //Nologo",
      :runner_path => ExecJS.root + "/support/jscript_runner.js",
      :encoding    => 'UTF-8' # CScript with //U returns UTF-16LE
    )

But it does not work neither !

I know that remove the line //= require_tree . of application.js works but I don't want a bad fix.

What should I do ?

I precise that ALL my js files (except application.js) are empty.

My gemfile :

 ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0

gem 'rails', '4.0.2'
gem 'bootstrap-sass', '~> 3.0.3.0'
gem 'bcrypt-ruby', '3.1.2'

group :development, :test do
  gem 'sqlite3', '1.3.8'
  gem 'rspec-rails', '2.13.1'
  #advanced stuff
  gem 'guard-rspec', '2.5.0'
  gem 'spork-rails', '4.0.0'
  gem 'guard-spork', '1.5.0'
  gem 'childprocess', '0.4.0'
end

group :test do
  gem 'selenium-webdriver', '2.35.1'
  gem 'capybara', '2.1.0'
  gem 'rb-notifu', '0.0.4'
  gem 'factory_girl_rails', '4.2.1'
end

gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'
gem 'execjs'

group :doc do
  gem 'sdoc', '0.3.20', require: false
end

group :production do
  gem 'pg', '0.15.1'
  gem 'rails_12factor', '0.0.2'
end

Solution

  • I "resolved" the problem, I formated my laptop and installed Windows 7 Ultimate...