经过多次尝试修复此问题(安装了rubyracer,更新了宝石),我仍然无法运行服务器。我刚刚安装了ubuntu 12.04,使用了ruby 2.0.0-p247和rails 4.0.0
/home/janharold/.rvm/gems/ruby-2.0.0-p247/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/janharold/.rvm/gems/ruby-2.0.0-p247/gems/execjs-1.4.0/lib/execjs.rb:5:in `<module:ExecJS>'
from /home/janharold/.rvm/gems/ruby-2.0.0-p247/gems/execjs-1.4.0/lib/execjs.rb:4:in `<top (required)>'
from /home/janharold/.rvm/gems/ruby-2.0.0-p247/gems/uglifier-2.1.2/lib/uglifier.rb:3:in `require'
from /home/janharold/.rvm/gems/ruby-2.0.0-p247/gems/uglifier-2.1.2/lib/uglifier.rb:3:in `<top (required)>'
from /home/janharold/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /home/janharold/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /home/janharold/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /home/janharold/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /home/janharold/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /home/janharold/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /home/janharold/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /home/janharold/GIT Repositories/treebook/config/application.rb:7:in `<top (required)>'
from /home/janharold/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from /home/janharold/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from /home/janharold/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /home/janharold/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
答案 0 :(得分:1)
显然,通过独立安装NodeJS,我设法运行服务器没有任何问题。
execJs: 'Could not find a JavaScript runtime' but execjs AND therubyracer are in Gemfile
的详细信息