Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a rack application that I want to migrate from Ruby 1.8.7 + Apache + passenger to Ruby 1.9.1 + Nginx + passenger.

I have made up the following script for a quick install all in one, and it raises an error...

Here is the installation script: (basic one with all the steps I need to install everything on a Ubuntu 10.04 Lucid Lynx fresh box)

Nginx sources

cd /tmp


tar xzf nginx-0.7.66.tar.gz

cd nginx-0.7.66

openssl required for SSL/TLS

sudo apt-get install openssl sudo apt-get install libssl-dev

Compilation stuff

sudo apt-get zlib1g-dev

Ruby interpreter 1.9.1

sudo apt-get install ruby1.9.1 ruby1.9.1-dev rubygems1.9.1 irb1.9.1 ri1.9.1 rdoc1.9.1 build-essential nginx libopenssl-ruby1.9.1

Make sure default ruby uses version 1.9.1

sudo update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.9.1 400 --slave /usr/share/man/man1/ruby.1.gz ruby.1.gz /usr/share/man/man1/ruby1.9.1.1.gz --slave /usr/bin/ri ri /usr/bin/ri1.9.1 --slave /usr/bin/irb irb /usr/bin/irb1.9.1 --slave /usr/bin/rdoc rdoc /usr/bin/rdoc1.9.1

sudo update-alternatives --config ruby

Passenger (rake-0.8.7, fastthread-1.0.7, rack-1.1.0, passenger-2.2.14)

sudo gem install passenger

Activate Passenger in nginx, select option 2 to use nginx sources donwloaded above

cd /var/lib/gems/1.9.1/gems/passenger-2.2.14/bin

sudo ./passenger-install-nginx-module

And this is the error message I got:

gcc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g   -I src/core -I src/event -I src/event/modules -I src/os/unix -I /tmp/pcre-8.00 -I objs -I src/http -I src/http/modules -I src/mail \
    -o objs/addon/nginx/StaticContentHandler.o \
/var/lib/gems/1.9.1/gems/passenger-2.2.14/ext/nginx/StaticContentHandler.c: In function ‘passenger_static_content_handler’:
/var/lib/gems/1.9.1/gems/passenger-2.2.14/ext/nginx/StaticContentHandler.c:71: error: ‘ngx_http_request_t’ has no member named ‘zero_in_uri’
make[1]: *** [objs/addon/nginx/StaticContentHandler.o] Error 1
make[1]: Leaving directory `/tmp/nginx-0.7.66'
make: *** [build] Error 2

It looks like something went wrong

Please read our Users guide for troubleshooting tips:

/var/lib/gems/1.9.1/gems/passenger-2.2.14/doc/Users guide Nginx.html

I do not understand the reason of this error. Is this a compatibility problem ? Hope you have any clues :) Thanks a lot,


share|improve this question
I had a closer look in the code that produces this error and saw there is a check on nginx version. If version is strictly lower than 8038 then "zero_in_uri" is checked. I moved to the last development version 8.0.40 and will make some more tests. Hopefully, the next stable version will not produce this error. – Luc Jun 8 '10 at 8:39
up vote 2 down vote accepted

I'm getting the same error with nginx 0.7.67 and Passenger 2.2.14. Looks like this is a bug - a change in nginx triggering a problem in Passenger - based on this ticket, and there is a patch in for Passenger 2.2.15.

share|improve this answer
As Victor suggests (below) Passenger 2.2.14 installs fine with Nginx 0.7.62. – pjmorse Jun 21 '10 at 17:17
Thanks. Well, I'd rather use the latest stable version (for both passenger and nginx). Thanks a lot to both of you guys. Luc – Luc Jul 9 '10 at 15:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.