我在 Rails 上运行 Ruby,快到了!我去执行命令
rails server
它抱怨 Javascript 运行时问题。下面只是一个例子。
/home/cameron/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
from /home/cameron/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/execjs-1.4.0/lib/execjs.rb:5:in `<module:ExecJS>'
所以我像上面所说的那样去了这个网站
https://github.com/sstephenson/execjs
您如何实际安装其中之一(例如 node.js)以使服务器正常工作?非常感谢你的帮助!我期待开始使用 Ruby on Rails