我的Rails 4應用程序有一個ExecJS :: RuntimeError。我在Windows 7 64位上。我已經檢查了這些兩個答案:ExecJS :: RuntimeError [Rails 4] Node.js已經安裝
ExecJS::RuntimeError in Rails 3
和ExecJS::RuntimeError on Windows trying to follow rubytutorial
然後,我想:
安裝的node.js,restard我的電腦,但仍然無法正常工作!
OR
修改C:\ RailsInstaller \ Ruby2.0.0 \ lib中\紅寶石\寶石\ 2.0.0 \寶石\ execjs-2.0.2 \ lib中\ execjs \ runtimes.rb通過改變。
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
)
通過
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
)
但它不工作也不!
我知道,刪除行的application.js
作品,但我不想要一個錯誤的修復。
我該怎麼辦?
我確切地說,我所有的js文件(application.js除外)都是空的。
我的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
我從來沒有修改過我的js文件,它們都是空的。 – Pierre