简体   繁体   中英

Passenger not working Mac OS X 10.6

I have a fair amount of experience installing and using mod_rails on Apache; it's been a nicely-working development environment on my Mac for a couple years now. I just upgraded to a new MacBook Air, and I have tried to replicate my environment on the new machine without luck. Here are the steps I followed:

  1. Using the default installation of Apache that comes with OS X (Apache 2.2.15)
  2. Install Passenger via the gem method (as per the instructions at modrails.org)
  3. Configured httpd.conf with the LoadModule and other configuration commands:

    LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-3.0.2/ext/apache2/mod_passenger.so PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-3.0.2 PassengerRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

I set up my Rails apps on their own custom domains on my machine in file called rails.conf. For example, I have one of my current sites configured like so:

<VirtualHost *>
ServerName monkey.dev
DocumentRoot /Users/aaron/Sites/monkey/public
<Directory /Users/aaron/Sites/monkey/public>
    AllowOverride all
    Options -MultiViews
</Directory>
RailsEnv development
</Virtualhost>

And in /etc/hosts, I have the domain configured to respond on the localhost:

127.0.0.1 monkey.dev

So everything ought to be working. But when I load monkey.dev, I just get a directory listing of my site root. It's as if Apache's working fine (it is), but Passenger isn't kicking in at all. I can find no error messages coming from it either, except for something that doesn't seem entirely related:

[Mon Jan 03 09:33:14 2011] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
mod_bonjour: Skipping user 'aaron' - cannot read index file '/Users/aaron/Sites/index.html'.

I'm really at a loss. Mongrel works just fine, so I'm getting by. But I love the convenience of Passenger running here, so I'd like to get to the bottom of this. Any suggestions?

Update : I've found a way to increase the log level of Passenger so it delivers a bit more data. With the log level set to max (3), I get this right after I start the server:

[ pid=2841 thr=0x7fff70dbfca0 file=ext/common/Watchdog.cpp:860 time=2011-01-03 10:39:48.27 ]: All Phusion Passenger agent processes have exited.

I've searched around for hints as to what this means, but nothing's come up. I've also run passenger-status:

----------- General information -----------
max      = 6
count    = 0
active   = 0
inactive = 0
Waiting on global queue: 0

----------- Application groups ---------

It's not crapped out from the looks of things. Hope this helps.

Thanks! Aaron.

Got it! Turns out that it wasn't a Passenger problem at all. Instead, it was my virtual hosts configuration in Apache. So, uh, never mind!

你完成了吗:

sudo apachectl restart

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM