小弟我初学 ruby,今天部署 rails 环境。在 debian 系统上,通过 rvm 安装的 ruby,rails,bundle。 使用 rails new demo 命令创建了一个名字为 demo 的项目,然后在 demo/script 目录下执行 rails server 命令,结果打印出了一堆错误信息。错误信息如下:
/home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/execjs-1.3.0/lib/execjs/runtimes.rb:50:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
from /home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/execjs-1.3.0/lib/execjs.rb:5
from /home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require'
from /home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/coffee-script-2.2.0/lib/coffee_script.rb:1
from /home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require'
from /home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/coffee-script-2.2.0/lib/coffee-script.rb:1
from /home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `require'
from /home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1
from /home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in `require'
from /home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in `require'
from /home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in `each'
from /home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in `require'
from /home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in `each'
from /home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in `require'
from /home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/bundler-1.0.22/lib/bundler.rb:122:in `require'
from /home/xudong/ruby/work/demo/config/application.rb:7
from /home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/railties-3.2.2/lib/rails/commands.rb:53:in `require'
from /home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/railties-3.2.2/lib/rails/commands.rb:53
from /home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/railties-3.2.2/lib/rails/commands.rb:50:in `tap'
from /home/xudong/.rvm/gems/ruby-1.8.7-p358/gems/railties-3.2.2/lib/rails/commands.rb:50
from script/rails:6:in `require'
from script/rails:6
在 google 上搜了一天了,有相同问题的不少,但是能解决的没有。麻烦知道解决方案的高手们,给指点一下啊。