我已经在OSX上安装了乘客首选项窗格,但每当我尝试运行应用程序时,我都会收到500内部错误。查看日志会给我以下错误:
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/utils.rb:25:in `require': no such file to load -- rubygems (LoadError) from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.5/lib/phusion_passenger/utils.rb:25 from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.5/bin/passenger-spawn-server:53:in `require' from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.5/bin/passenger-spawn-server:53 [ pid=403 file=ext/apache2/Hooks.cpp:725 time=2009-11-15 23:33:38.110 ]: Unexpected error in mod_passenger: Cannot spawn application '/Users/waynemolina/Projects/sandbox/rack-hello-world': The spawn server has exited unexpectedly. Backtrace: in 'virtual boost::shared_ptr Passenger::ApplicationPoolServer::Client::get(const Passenger::PoolOptions&)' (ApplicationPoolServer.h:471) in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:521)
由于rubygems在其他地方都有效,我只能假设这个错误是因为Passenger正在寻找Rubygems的错误位置。我手动安装了Rubygems,根据/usr/local/bin/gem
,它位于which gem
。但是,whereis gem
会返回/usr/bin/gem
。我不知道我需要采取哪些措施来解决这个问题,而不仅仅是重新安装OSX并升级内置的RubyGems安装而不是自己安装它。