nginx airline_root 不接受有效的 airline 宝石位置

nginx airline_root 不接受有效的 airline 宝石位置

我正在尝试将 Passenger_root 和 Passenger_ruby 添加到我的 nginx.conf 文件中,但是当我尝试重新启动 NGINX 时收到以下消息:

Starting nginx: nginx: [alert] Unable to start the Phusion Passenger watchdog
because its executable (/usr/lib/phusion-passenger/agents/PassengerWatchdog) does not 
exist. This probably means that your Phusion Passenger installation is broken or 
incomplete, or that your 'passenger_root' directive is set to the wrong value. Please 
reinstall Phusion Passenger or fix your 'passenger_root' directive, whichever is 
applicable. (-1: Unknown error)
nginx.

在我的 nginx.conf 文件中:

http {
    passenger_root /home/deploy/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.14;
    passenger_ruby /home/deploy/.rvm/wrappers/ruby-2.0.0-p247/ruby;

这些都是有效的途径

我看了这个帖子:nginx 不确认乘客根选项并试图逃跑

 apt-get remove nginx

但它告诉我 nginx 未安装。我正在使用 RVM + Passenger + Nginx

我通过运行 gem install airline 安装了 airline。之前已经安装了 Nginx,我刚刚尝试在 nginx.conf 文件中修改了 airline 新版本的路径。我需要做一些额外的事情来让两者一起工作吗?

如果我尝试运行sudo 乘客-安装-nginx-模块

我收到消息:

Nginx with Passenger support was successfully installed.

Please edit your Nginx configuration file (probably /opt/nginx/conf/nginx.conf),
and set the passenger_root and passenger_ruby configuration options in the
'http' block, like this:

  http {
      ...
      passenger_root /var/lib/gems/1.9.1/gems/passenger-3.0.19;
      passenger_ruby /usr/bin/ruby1.9.1;
      ...
  }

这是旧的 ruby​​ 路径...如果我运行 rvm info,我会得到正确的 ruby​​2.0 路径

相关内容