Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/66.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Can';在Ubuntu上启动Rails服务器寻找运行时,即使它已经安装_Ruby On Rails_Ruby On Rails 4 - Fatal编程技术网

Ruby on rails Can';在Ubuntu上启动Rails服务器寻找运行时,即使它已经安装

Ruby on rails Can';在Ubuntu上启动Rails服务器寻找运行时,即使它已经安装,ruby-on-rails,ruby-on-rails-4,Ruby On Rails,Ruby On Rails 4,经过几次修复(安装了rubyracer,更新了gems),我仍然无法运行服务器。我在新安装的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.c

经过几次修复(安装了rubyracer,更新了gems),我仍然无法运行服务器。我在新安装的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>'
/home/janharold/.rvm/gems/ruby-2.0.0-p247/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:在“自动检测”中:找不到JavaScript运行时。看见https://github.com/sstephenson/execjs 获取可用运行时的列表。(ExecJS::RuntimeUnavailable)
from/home/janharold/.rvm/gems/ruby-2.0.0-p247/gems/execjs-1.4.0/lib/execjs.rb:5:in`'
from/home/janharold/.rvm/gems/ruby-2.0.0-p247/gems/execjs-1.4.0/lib/execjs.rb:4:in`'
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`'
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:require中的“块(2个级别)”中
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:在“请求中的块”中
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`'
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'
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`'
从箱子/轨道:4:in“require”
从箱子/轨道:4:in`'

显然,通过独立安装NodeJ,我成功地运行了服务器,没有任何问题


详细信息参见

这是最好、最快的选择。我总是在每台服务器或开发人员机器上安装NodeJS,NodeJS在任何地方都能解决这个javascript运行时问题。:)