开发者

Nginx and passenger 3.0.0 on mac - why does it fail on startup?

I've been trying to set up nginx 0.8.53 and passenger 3.0.0 on my dev environment - o开发者_如何学Pythonsx snow leopard and REE. I manually compiled nginx with the passenger module linked in.

When I tried running passenger, it had a problem - ENV['PATH'] appeared to be null, so the split on it when call PlatformInfo.find_command raised an exception. It was called when trying to find out the osname - looking for the sw_vers command.

I tweaked the source and told it that it was macosx and then it complained that it couldn't find the Rails 2.3.8 gem. This is probably related to the first problem.

I'm not sure how to troubleshoot this? When I su -i and sudo nobody, both users let me start irb and see the expected value for ENV['PATH'], so I'm not sure why it's not working when passenger is running?


One possibility: Passenger launches as the user that owns the config/environment.rb file (or of the config.ru file, if you have one) - make sure that file's owner is something sensible.


I don't know how you start Nginx, but you can write a launcher script for Nginx that starts Nginx with a specific environment, like this:

#!/bin/bash
export PATH=whatever
exec /path/to/nginx
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜