nginx Passenger_root 不接受有效的乘客 Gem 位置

nginx Passenger_root 不接受有效的乘客 Gem 位置

我正在嘗試將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-不確認-passenger-root-選項並試圖跑

 apt-get remove nginx

但它告訴我 nginx 沒有安裝。我正在使用 RVM + Passenger + Nginx

我透過執行 gem install Passenger 安裝了 Passenger。之前安裝了Nginx,我只是嘗試修改nginx.conf檔案中新版本passenger的路徑。我需要做一些額外的事情才能使兩者一起工作嗎?

如果我嘗試跑步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 路徑

相關內容