在CentOS 5.4上使用Ruby 1.8.7。试图在乘客上获得Rails 3应用程序。
我已完成所有步骤,但在我的Apache日志文件中出现此错误
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或我的应用程序的权限被拒绝了吗?
独立模式的乘客给我一个关于无法加载Bundler的错误。
真的想让它在Apache2下运行。
答案 0 :(得分:4)
廷德尔 看起来运行apache的用户没有权限
Could not start the spawn server: /usr/lib/ruby/: Permission denied (13)
尝试 su 给运行apache的用户,并尝试运行ruby或访问文件夹/ usr / lib / ruby
尝试以下步骤检查apache是否具有权限。
如果所有这些都有效,请在此粘贴您为乘客提供的apache配置。
应该是
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