每次我尝试安装时都会遇到相同的错误rvmsudo passenger-install-nginx-module
:
~/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'passenger' (>= 0) among 114 total gem(s) (Gem::LoadError)
from ~/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from ~/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from ~/.rvm/gems/ruby-2.0.0-p247@rails4/bin/passenger:22:in `<main>'
from ~/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
from ~/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'
系统。信息:
- OSX 10.0.4
- 红宝石 2.0.0-p247
- 导轨 4
- 乘客 4.0.20(已安装
rvmsudo
)
附言
我已经使用过rvmsudo
,因此仅使用它并不能解决问题,因为其他一些问题/答案可能会提出建议。我认为问题出在路径上,但在哪里?
更新:
我在没有rvmsudo
(安装乘客 gem)的情况下做了同样的事情,但仍然运行(rvmsudo) passenger-install-nginx-module
导致缺少 gem 的错误passenger
更新2:
我安装homebrew
并在它的帮助下安装了passenger
. 然后安装了不起作用的乘客 nginx 模块:
Unable to start the Phusion Passenger watchdog because its executable (/usr/lib/phusion-passenger/agents/PassengerWatchdog) does not exist. This probably means that your Phusion Passenger installation is broken or incomplete, or that your 'PassengerRoot' directive is set to the wrong value. Please reinstall Phusion Passenger or fix your 'PassengerRoot' directive, whichever is applicable.
然后我用 安装了乘客 nginx 模块rvmsudo passenger-install-nginx-module
,所以现在它工作了。我为我的 Rails 应用程序配置了它。但是,如果我从启动 nginx/opt/nginx/sbin/nginx
并导航到 vhost 到我的 rails 应用程序,我会得到:
No data received
Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
如果我查看/opt/nginx/log/error.log
我得到的那个请求:
libc++abi.dylib: terminate called throwing an exception
2013/10/21 15:15:30 [alert] 54636#0: worker process 54723 exited on signal 6
这里可能有什么问题,是乘客吗?我的 Rails 应用程序与 WebRick 配合得很好,它在另一台服务器上运行,对乘客也很好。也许这已经是另一个问题了……