获取的Rails 3和乘客在CentOS 5.4的工作 - Apache的错误 [英] Getting Rails 3 and Passenger to work on CentOS 5.4 - Apache Error

查看:281
本文介绍了获取的Rails 3和乘客在CentOS 5.4的工作 - Apache的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在CentOS 5.4使用Ruby 1.8.7。试图让Rails 3中应用了客运。

Using Ruby 1.8.7 on CentOS 5.4. Trying to get Rails 3 app up on Passenger.

我已经完成了所有的步骤走了,但在我的Apache日志文件中得到这个错误

I have gone through all the steps but get this error in my Apache log file

Passenger ERROR (ext/common/ApplicationPool/../SpawnManager.h:220):
Could not start the spawn server: /usr/lib/ruby/: Permission denied (13)
[ pid=18207 thr=3086812880 file=ext/apache2/HelperAgent.cpp:354 time=2011-02-09 09:27:18.541 ]: Could not start the spawn server: write() failed: Broken pipe (32)
     in 'Passenger::SpawnManager::SpawnManager(const std::string&, const boost::shared_ptr<Passenger::ServerInstanceDir::Generation>&, const Passenger::AccountsDatabasePtr&, const std::string&, const Passenger::AnalyticsLoggerPtr&, int, const std::string&)' (SpawnManager.h:540)
     in 'Passenger::ApplicationPool::Pool::Pool(const std::string&, const boost::shared_ptr<Passenger::ServerInstanceDir::Generation>&, const Passenger::AccountsDatabasePtr&, const std::string&, const Passenger::AnalyticsLoggerPtr&, int, const std::string&)' (Pool.h:1078)
     in 'Server::Server(Passenger::FileDescriptor, pid_t, const std::string&, bool, const std::string&, const std::string&, const std::string&, const std::string&, unsigned int, unsigned int, unsigned int, unsigned int, const Passenger::VariantMap&)' (HelperAgent.cpp:241)
     in 'int main(int, char**)' (HelperAgent.cpp:344)

[Wed Feb 09 09:27:18 2011] [error]
Passenger could not be initialized because of this error: Unable to start the Phusion Passenger watchdog because it encountered the following error during startup: Unable to start the Phusion Passenger helper agent: it seems to have crashed during startup for an unknown reason, with exit code 1
[Wed Feb 09 09:27:18 2011] [notice] Digest: generating secret for digest authentication ...
[Wed Feb 09 09:27:18 2011] [notice] Digest: done
Passenger ERROR (ext/common/ApplicationPool/../SpawnManager.h:220):
Could not start the spawn server: /usr/lib/ruby/: Permission denied (13)
[ pid=18221 thr=3086513872 file=ext/apache2/HelperAgent.cpp:354 time=2011-02-09 09:27:18.592 ]: Could not start the spawn server: write() failed: Broken pipe (32)
     in 'Passenger::SpawnManager::SpawnManager(const std::string&, const boost::shared_ptr<Passenger::ServerInstanceDir::Generation>&, const Passenger::AccountsDatabasePtr&, const std::string&, const Passenger::AnalyticsLoggerPtr&, int, const std::string&)' (SpawnManager.h:540)
     in 'Passenger::ApplicationPool::Pool::Pool(const std::string&, const boost::shared_ptr<Passenger::ServerInstanceDir::Generation>&, const Passenger::AccountsDatabasePtr&, const std::string&, const Passenger::AnalyticsLoggerPtr&, int, const std::string&)' (Pool.h:1078)
     in 'Server::Server(Passenger::FileDescriptor, pid_t, const std::string&, bool, const std::string&, const std::string&, const std::string&, const std::string&, unsigned int, unsigned int, unsigned int, unsigned int, const Passenger::VariantMap&)' (HelperAgent.cpp:241)
     in 'int main(int, char**)' (HelperAgent.cpp:344)

不知道从哪里开始。允许Ruby或我的应用程序被拒绝?

Don't know where to start. Permission to Ruby or my App is denied?

乘客在单机模式下给我一个错误有关无法加载捆扎机。

Passenger in stand alone mode gives me an error about not being able to load Bundler.

真的想的Apache2下获得这个运行。

Would really like to get this running under Apache2.

推荐答案

廷德尔,
它看起来像它运行的Apache没有权限用户

Tyndall, It looks like the user which runs apache doesn't have permissions

Could not start the spawn server: /usr/lib/ruby/: Permission denied (13)

尝试,以它运行Apache的用户,并尝试运行红宝石或访问文件夹/ usr / lib目录/红宝石

try to su to the user which runs apache, and try running ruby or accessing the folder /usr/lib/ruby

请尝试以下步骤来检查了Apache的权限。

Try these steps to check if apache has permissions.


  • 登录到UNIX服务器

  • [如果你不是根]成为root用户运行的须藤苏 -

  • 检查哪些用户正在运行的Apache再见运行的 PS -ef | grep的-i阿帕奇(第一栏应该显示用户名)

  • 现在,成为Apache的运行苏阿帕奇 - (如果Apache是​​用户名)

  • 现在,运行的 CD的/ usr LS CD 执行权限的文件夹,支票和 LS 作为读取权限)

  • 对于 / usr / lib目录之前做同样的步骤。这是必要的,因为它可能是阿帕奇不能访问路径中的文件夹中的一个。

  • 一旦你在 /使用/ lib目录查看红宝石的二进制文件是有运行的 ls -l命令红宝石

  • 终于尝试从 ./红宝石-v (检查它返回正确的版本)
  • 文件夹运行Ruby
  • Log in to the unix server
  • [if you're not root] become root by running sudo su -
  • check which user is running apache bye running ps -ef | grep -i apache (the first column should display the user name)
  • now become apache by running su apache - (if apache is the user name)
  • now run cd /usr and ls (cd checks for execution permission on the folder and ls for read permissions)
  • do the same as the step before for /usr/lib. This is necessary because it might be that apache cannot access one of the folders in the path.
  • once you're in /use/lib check that binary file of ruby is there by running ls -l ruby
  • finally try to run ruby from that folder with ./ruby -v (check that it returns the correct version)

如果所有的作品,请贴在这里Apache的配置你有乘客。

If all of that works, please paste here the apache configuration you have for passenger.

这应该是类似

LoadModule passenger_module /usr/local/ruby/lib/ruby/gems/1.9.1/gems/passenger-3.0.2/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/ruby/lib/ruby/gems/1.9.1/gems/passenger-3.0.2
PassengerRuby /usr/local/ruby/bin/ruby
PassengerDefaultUser www-data

这篇关于获取的Rails 3和乘客在CentOS 5.4的工作 - Apache的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆