您好,我正在使用Windows 8上的導軌上的紅寶石,我很難在我的機器上設置ruby 2.1。當我運行軌道的I得到以下錯誤:rails s命令不起作用
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/execjs-2.2.0/lib/execjs/run
times.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://gi
thub.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUn
available)
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/execjs-2.2.0/l
ib/execjs.rb:5:in `<module:ExecJS>'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/execjs-2.2.0/l
ib/execjs.rb:4:in `<top (required)>'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/uglifier-2.5.1
/lib/uglifier.rb:3:in `require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/uglifier-2.5.1
/lib/uglifier.rb:3:in `<top (required)>'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.6.3/
lib/bundler/runtime.rb:76:in `require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.6.3/
lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.6.3/
lib/bundler/runtime.rb:72:in `each'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.6.3/
lib/bundler/runtime.rb:72:in `block in require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.6.3/
lib/bundler/runtime.rb:61:in `each'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.6.3/
lib/bundler/runtime.rb:61:in `require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.6.3/
lib/bundler.rb:132:in `require'
from C:/HandCo-op/HandCo-op/config/application.rb:7:in `<top (required)>
'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.1.2
.rc1/lib/rails/commands/commands_tasks.rb:79:in `require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.1.2
.rc1/lib/rails/commands/commands_tasks.rb:79:in `block in server'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.1.2
.rc1/lib/rails/commands/commands_tasks.rb:76:in `tap'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.1.2
.rc1/lib/rails/commands/commands_tasks.rb:76:in `server'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.1.2
.rc1/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.1.2
.rc1/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
我想這是因爲我需要紅寶石2.1和安裝的版本是2.0。有誰知道我應該如何解決這些錯誤?非常感謝任何人有一個想法,爲什麼我不能運行rails s。
Protip,堆棧跟蹤通常會給出原因的線索,或者至少是問題出在哪裏。儘管第一行非常神祕,但下一步您可以通過https://github.com/sstephenson/execjs獲取更多信息。 – Unixmonkey