0

我已经使用rails g appname创建了一个简单的应用程序,但是当我运行rails server时它会抛出此错误

/home/ajit/.rvm/gems/ruby-1.9.3-p429/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/ajit/.rvm/gems/ruby-1.9.3-p429/gems/execjs-1.4.0/lib/execjs.rb:5:in `<module:ExecJS>'
    from /home/ajit/.rvm/gems/ruby-1.9.3-p429/gems/execjs-1.4.0/lib/execjs.rb:4:in `<top (required)>'
    from /home/ajit/.rvm/gems/ruby-1.9.3-p429/gems/uglifier-2.1.1/lib/uglifier.rb:3:in `require'
    from /home/ajit/.rvm/gems/ruby-1.9.3-p429/gems/uglifier-2.1.1/lib/uglifier.rb:3:in `<top (required)>'
    from /home/ajit/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
    from /home/ajit/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
    from /home/ajit/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
    from /home/ajit/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
    from /home/ajit/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
    from /home/ajit/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
    from /home/ajit/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
    from /home/ajit/Desktop/rail/ebr_server/config/application.rb:7:in `<top (required)>'
    from /home/ajit/.rvm/gems/ruby-1.9.3-p429/gems/railties-4.0.0.rc1/lib/rails/commands.rb:78:in `require'
    from /home/ajit/.rvm/gems/ruby-1.9.3-p429/gems/railties-4.0.0.rc1/lib/rails/commands.rb:78:in `block in <top (required)>'
    from /home/ajit/.rvm/gems/ruby-1.9.3-p429/gems/railties-4.0.0.rc1/lib/rails/commands.rb:75:in `tap'
    from /home/ajit/.rvm/gems/ruby-1.9.3-p429/gems/railties-4.0.0.rc1/lib/rails/commands.rb:75:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'
4

0 回答 0