diff --git a/Formula/nginx.rb b/Formula/nginx.rb index f3f4bcecde..e7506df369 100644 --- a/Formula/nginx.rb +++ b/Formula/nginx.rb @@ -30,10 +30,10 @@ class Nginx < Formula skip_clean 'logs' def passenger_config_args - passenger_root = `passenger-config --root`.chomp + nginx_ext = `passenger-config --nginx-addon-dir`.chomp - if File.directory?(passenger_root) - return "--add-module=#{passenger_root}/ext/nginx" + if File.directory?(nginx_ext) + return "--add-module=#{nginx_ext}" end puts "Unable to install nginx with passenger support. The passenger"