Error in starting Rails Passenger App

老子叫甜甜 提交于 2021-02-11 01:28:55

问题


I changed ruby version to 2.1.5 with RVM, configured 4 rails App with Apache, but I can't start them with Passenger. So I got this error everytime.

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.

How should I correct situation? I use chown -R 777 /root/.rvm/gems/ruby-2.1.5/gems/passenger-5.0.8/buildout/support-binaries/ , but problem last


回答1:


First of all, you should not run your application with the root user.

Add PassengerUserSwitching on to your virtual host. If your web app is owned by root, it should be able to use rvm (as it is installed for root user only).



来源:https://stackoverflow.com/questions/30585392/error-in-starting-rails-passenger-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!