我花了好几天试图修复这个血腥的错误但仍然不成功,我已经尝试了所有我可以在stackoverflow和其他网站上的解决方案。我已经下载并安装了nodejs,只是为了让你知道。
这是错误跟踪:
C:\ Sites \ RDB> rails s
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/coffee-script-2.4.1/lib/cof
fee_script.rb:1:require': cannot load such file -- execjs (LoadError)
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/coffee-script-
2.4.1/lib/coffee_script.rb:1:in
'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/coffee-script-
2.4.1 / lib / coffee-script.rb:1:in require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/coffee-script-
2.4.1/lib/coffee-script.rb:1:in
'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/coffee-rails-4
.1.1 / lib / coffee-rails.rb:1:在require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/coffee-rails-4
.1.1/lib/coffee-rails.rb:1:in
'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/
lib / bundler / runtime.rb:76:在require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/
lib/bundler/runtime.rb:76:in
块中(2级)in require'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/
lib / bundler / runtime.rb:72:在each'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/
lib/bundler/runtime.rb:72:in
块中的require'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/
lib / bundler / runtime.rb:61:在each'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/
lib/bundler/runtime.rb:61:in
require'中
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/
lib / bundler.rb:133:require'
from C:/Sites/RDB/config/application.rb:11:in
'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.2.4
/lib/rails/commands/commands_tasks.rb:78:in require'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.2.4
/lib/rails/commands/commands_tasks.rb:78:in
阻止服务器'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.2.4
/lib/rails/commands/commands_tasks.rb:75:in tap'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.2.4
/lib/rails/commands/commands_tasks.rb:75:in
server'
来自C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.2.4
/lib/rails/commands/commands_tasks.rb:39:in run_command!'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.2.4
/lib/rails/commands.rb:17:in
'
来自bin / rails:9:require'
from bin/rails:9:in
'
答案 0 :(得分:0)
我最终这样做了,错误消失了!我觉得RailsInstaller需要提出一个解决方案,否则像我这样的初学者如果使用windows就必须面对这场噩梦
ExecJS::RuntimeError on Windows trying to follow rubytutorial
1)删除// = require_tree。 /忽略问题 - 正如ColinR上面所述,这条线不应该首先导致问题。 ExecJS在系统上运行JavaScript运行时存在实际问题,删除此行只是忽略了这一事实。