# Upgrading nginx with passenger

## remix

I updated my nginx to www-servers/nginx-1.0.10

and adding NGINX_MODULES_HTTP="passenger" breaks with this message

```
* nginx-1.0.10.tar.gz RMD160 SHA1 SHA256 size ;-) ...                                                     [ ok ]

 * 

 * Passenger support has been removed from the nginx ebuild to

 * get rid of file collisions, its broken build system and

 * incompatibilities between passenger 2 and 3.

 * 

 * Please switch to passenger-3 standalone or use the

 * unicorn gem which provides a sane nginx-like architecture

 * out of the box.

 * 

 * For more information on sane ruby deployments with

 * passenger-3/unicorn go to:

 * 

 * https://rvm.beginrescueend.com

 * 

 * ERROR: www-servers/nginx-1.0.10 failed (setup phase):

 *   nginx_modules_http_passenger still in IUSE

 * 

 * Call stack:

 *             ebuild.sh, line  85:  Called pkg_setup

 *   nginx-1.0.10.ebuild, line 136:  Called die

 * The specific snippet of code:

 *         die "nginx_modules_http_passenger still in IUSE"

 * 

 * If you need support, post the output of 'emerge --info =www-servers/nginx-1.0.10',

 * the complete build log and the output of 'emerge -pqv =www-servers/nginx-1.0.10'.

 * The complete build log is located at '/var/tmp/portage/www-servers/nginx-1.0.10/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/www-servers/nginx-1.0.10/temp/die.env'.

 * S: '/var/tmp/portage/www-servers/nginx-1.0.10/work/nginx-1.0.10'

```

so i removed NGINX_MODULES_HTTP="passenger" and updated nginx normally

then emerged www-apache/passenger-3.0.11

i haven't found any manuals online on how to do this.

so i did passenger start

```
passenger start

*** ERROR ***

Could not start Passenger Nginx core:

nginx: [alert] could not open error log file: open()

"/tmp/passenger-standalone.5674/logs/error.log" failed (2: No such file or

directory)

nginx: [alert] Unable to start the Phusion Passenger watchdog because it

encountered the following error during startup: Unable to start the Phusion

Passenger logging agent because its executable

(/var/lib/passenger-standalone/natively-packaged/support/agents/PassengerLogging

Agent) doesn't exist. This probably means that your Phusion Passenger

installation is broken or incomplete. Please reinstall Phusion Passenger (-1:

Unknown error)

Stopping web server... done

```

then i attempted passenger-install-nginx-module

and got an error compiling nginx

```
Compiling Passenger support files...

# /usr/bin/ruby18 /usr/bin/rake nginx:clean nginx RELEASE=yes

(in /usr/share/phusion-passenger/source)

rm -rf ext/common/libboost_oxt.a ext/common/libboost_oxt

rm -rf ext/common/libpassenger_common.a ext/common/libpassenger_common

rm -f agents/PassengerWatchdog agents/PassengerLoggingAgent

rm -rf agents/nginx/PassengerHelperAgent

mkdir -p ext/common/libboost_oxt

x86_64-pc-linux-gnu-g++ -Iext  -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -DBOOST_DISABLE_ASSERTS -o ext/common/libboost_oxt/aggregate.o -c ext/common/libboost_oxt/aggregate.cpp

mkdir -p ext/common/libboost_oxt

rm -rf ext/common/libboost_oxt.a

ar cru ext/common/libboost_oxt.a ext/common/libboost_oxt/aggregate.o

ranlib ext/common/libboost_oxt.a

mkdir -p ext/common/libpassenger_common

x86_64-pc-linux-gnu-g++ -Iext -Iext/common -Iext/libev  -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -DBOOST_DISABLE_ASSERTS -o ext/common/libpassenger_common/aggregate.o -c ext/common/libpassenger_common/aggregate.cpp

rm -rf ext/common/libpassenger_common.a

ar cru ext/common/libpassenger_common.a ext/common/libpassenger_common/aggregate.o

ranlib ext/common/libpassenger_common.a

x86_64-pc-linux-gnu-g++ ext/nginx/HelperAgent.cpp -o agents/nginx/PassengerHelperAgent -Iext -Iext/common -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -DBOOST_DISABLE_ASSERTS  ext/common/libpassenger_common.a ext/common/libboost_oxt.a -lpthread -rdynamic 

x86_64-pc-linux-gnu-g++ ext/common/Watchdog.cpp -o agents/PassengerWatchdog -Iext -Iext/common -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -DBOOST_DISABLE_ASSERTS ext/common/libpassenger_common.a ext/common/libboost_oxt.a -lpthread -rdynamic 

rake aborted!

Don't know how to build task 'ext/libev/configure'

```

any help would greatly be appreciated.

----------

## wmark

The Nginx ebuilds in my overlay still feature support for 'passenger'. See OSSDL overlay for Gentoo.

----------

## EinZteiN

 *wmark wrote:*   

> The Nginx ebuilds in my overlay still feature support for 'passenger'. See OSSDL overlay for Gentoo.

 

Is there a way to override your choice of Ruby 1.8 on that ebuild?

Thanks for your work!  :Smile: 

----------

## EinZteiN

For the record, I copied the latest nginx ebuild from the overlay and customized it myself removing some of the gems that it attempts to install from Portage. I personally dislike installing gems that way so I just installed them manually (e.g. rack and rake) and then I was able to set RUBY_TARGETS to "ruby19".

On a side note, I couldn't compile it with "upload_progress" support but, other than that, I installed it just fine, and with a whole bunch of NGINX_MODULES!

Gosh, I love Gentoo/Portage…  :Smile: 

----------

