启动Rails Passenger App时出错

时间:2015-06-02 00:16:11

标签: ruby-on-rails passenger

我使用RVM将ruby版本更改为2.1.5,使用Apache配置了4个应用程序,但我无法使用Passenger启动它们。所以我每次都会收到这个错误。

App 8612 stderr: Cannot execute "/root/.rvm/gems/ruby-2.1.5/gems/passenger-5.0.8/buildout/support-binaries/PassengerAgent": Permission denied (errno=13)
[ 2015-06-01 20:11:43.2847 8422/7f244835b700 App/Implementation.cpp:287 ]: Could not spawn process for application /var/www/example: An error occured while starting up the preloader.
  Error ID: 2862c35c
  Error details saved to: /tmp/passenger-error-pKDVAi.html
  Message from application: Cannot execute "/root/.rvm/gems/ruby-2.1.5/gems/passenger-5.0.8/buildout/support-binaries/PassengerAgent": Permission denied (errno=13)


[ 2015-06-01 20:11:43.2889 8422/7f2449b9f700 age/Hel/Req/CheckoutSession.cpp:252 ]: [Client 2-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 2862c35c. Please see earlier logs for details about the error.

我该如何纠正这种情况?我使用chown -R 777 /root/.rvm/gems/ruby-2.1.5/gems/passenger-5.0.8/buildout/support-binaries/,但问题是最后一次

1 个答案:

答案 0 :(得分:0)

首先,您不应该使用root用户运行您的应用程序。

PassengerUserSwitching on添加到虚拟主机。如果您的Web应用程序由root拥有,则它应该能够使用rvm(因为它仅为root用户安装)。