Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/61.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 Node.js运行时,轨道位于乘客侧_Ruby On Rails_Passenger - Fatal编程技术网

Ruby on rails Node.js运行时,轨道位于乘客侧

Ruby on rails Node.js运行时,轨道位于乘客侧,ruby-on-rails,passenger,Ruby On Rails,Passenger,我正在尝试在ubuntu 14.04上安装nginx+passenger+rails 最大的要求是能够安装不带sudo的node包,实现这一点的最简单方法是为用户安装node,而不是为系统安装afaik。因此,我尝试使用nvm,它对资产编译几乎没有影响,但当我尝试访问网页时,passenger.log中出现了一个错误 `Error details saved to: /tmp/passenger-error-rMZT8N.html Message from application: Coul

我正在尝试在ubuntu 14.04上安装nginx+passenger+rails 最大的要求是能够安装不带sudo的node包,实现这一点的最简单方法是为用户安装node,而不是为系统安装afaik。因此,我尝试使用nvm,它对资产编译几乎没有影响,但当我尝试访问网页时,passenger.log中出现了一个错误

`Error details saved to: /tmp/passenger-error-rMZT8N.html
  Message from application: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
/var/www/something/shared/bundle/ruby/2.2.0/gems/execjs-2.6.0/lib/execjs/runtimes.rb:48:in `autodetect'
Nodejs路径在nginx.conf中指定如下

passenger\u nodejs/home/deployer/.nvm/versions/node/v5.2.0/bin/node

但那没用

更新:完整错误消息 App 7059标准件:

App 7059 stderr: sh: 1:
App 7059 stderr: env: not found
App 7059 stderr:
App 7059 stdout: 
[ 2015-12-14 23:15:37.2157 22792/b596fb40 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /var/www/something/current: An error occurred while starting up the preloader.
  Error ID: 83f25d05
  Error details saved to: /tmp/passenger-error-nee6cQ.html
  Message from application: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
  /var/www/something/shared/bundle/ruby/2.2.0/gems/execjs-2.6.0/lib/execjs/runtimes.rb:48:in `autodetect'
  /var/www/something/shared/bundle/ruby/2.2.0/gems/execjs-2.6.0/lib/execjs.rb:5:in `<module:ExecJS>'
  /var/www/something/shared/bundle/ruby/2.2.0/gems/execjs-2.6.0/lib/execjs.rb:4:in `<top (required)>'
  /var/www/something/shared/bundle/ruby/2.2.0/gems/uglifier-2.7.2/lib/uglifier.rb:3:in `require'
  /var/www/something/shared/bundle/ruby/2.2.0/gems/uglifier-2.7.2/lib/uglifier.rb:3:in `<top (required)>'
  /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `require'
  /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
  /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `each'
  /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require'
  /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each'
  /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require'
  /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler.rb:134:in `require'
  /var/www/something/releases/20151215040905/config/application.rb:7:in `<top (required)>'
  /var/www/something/releases/20151215040905/config/environment.rb:2:in `require'
  /var/www/something/releases/20151215040905/config/environment.rb:2:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /var/www/something/shared/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
  /var/www/something/shared/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `eval'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `preload_app'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
App 7059标准:sh:1: App 7059标准:环境:未找到 App 7059标准: App 7059标准件: [2015-12-14 23:15:37.2157 22792/b596fb40 age/Cor/App/Implementation.cpp:304]:无法为应用程序/var/www/something/current生成进程:启动预加载程序时出错。 错误ID:83f25d05 错误详细信息保存到:/tmp/passenger-Error-nee6cQ.html 来自应用程序的消息:找不到JavaScript运行时。看见https://github.com/rails/execjs 获取可用运行时的列表。(ExecJS::RuntimeUnavailable) /var/www/something/shared/bundle/ruby/2.2.0/gems/execjs-2.6.0/lib/execjs/runtimes.rb:48:in'autodetect' /var/www/something/shared/bundle/ruby/2.2.0/gems/execjs-2.6.0/lib/execjs.rb:5:in`' /var/www/something/shared/bundle/ruby/2.2.0/gems/execjs-2.6.0/lib/execjs.rb:4:in`' /var/www/something/shared/bundle/ruby/2.2.0/gems/uglifier-2.7.2/lib/uglifier.rb:3:in'require' /var/www/something/shared/bundle/ruby/2.2.0/gems/uglifier-2.7.2/lib/uglifier.rb:3:in`' /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:在'require'中 /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:“请求中的块(2个级别)”中 /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:在'each'中 /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:在'block in require'中 /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:在'each'中 /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in'require' /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler.rb:134:在'require'中 /var/www/something/releases/20151215040905/config/application.rb:7:in`' /var/www/something/releases/20151215040905/config/environment.rb:2:in'require' /var/www/something/releases/20151215040905/config/environment.rb:2:in`' config.ru:3:in'require' config.ru:3:in'block in' /var/www/something/shared/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in'instance_eval' /var/www/something/shared/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in'initialize' config.ru:1:in'new' config.ru:1:in`' /usr/share/passenger/helper脚本/rack preload.rb:110:in'eval' /usr/share/passenger/helper脚本/rack preload.rb:110:in'preload_app' /usr/share/passenger/helper脚本/rack preload.rb:156:in`' /usr/share/passenger/helper脚本/rack preload.rb:30:in`'
相反,bundle exec rails s-e staging-b0.0.0工作正常