Passenger Installs Twice

Here is the current error involving Passenger:

Code:
   You are currently validating against Phusion Passenger 5.3.4, located in:

     /usr/local/lib/ruby/gems/2.5/gems/passenger-5.3.4/bin/passenger

   Besides this Passenger installation, the following other
   Passenger installations have also been detected:

     /usr/local/bin/passenger

   Please uninstall these other Passenger installations to avoid
   confusion or conflicts.

I encountered the same before, decided to deinstall www/nginx and www/rubygem-passenger.

I checked these locations, found neither Passenger was installed. So none were there. I installed the same ports, www/nginx first, then www/rubygem-passenger. Then I got this error again upon the passenger-config validate-install.

So, installing both these ports, I get two Passengers. How can I fix this?
 
OK, removed associated versions of ruby, removed rbenv. Installed lang/ruby25, bundler and updated Gems. Passenger checks fine.

New issues on testing nginx:

Code:
Performing sanity check on nginx configuration:
nginx: [emerg] unknown directive "passenger_root" in /usr/local/etc/nginx/nginx.conf:17
nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed

That line:

passenger_root /usr/local/lib/ruby/gems/2.5/gems/passenger-5.3.4;

Code:
$ which passenger
/usr/local/lib/ruby/gems/2.5/gems/passenger-5.3.4
$ passenger-config --root
/usr/local/lib/ruby/gems/2.5/gems/passenger-5.3.4

I even reinstalled www/rubygem-passenger and same issue. Now nginx isn't happy with Passenger. I don't have RVM nor rbenv. I don't know what else I can do.

You know, for such a famous stack, you would think this would be polished and effortless.

Edit: At this point I'm not sure if that unknown directive is whining that it doesn't know Passenger or its value.
 
Make sure it's rubygem-passenger-nginx and not rubygem-passenger-apache that you installed. I don't use nginx for Passenger (we use Apache instead) so I'll have to guess a few things. Make sure the passenger module exists in /usr/local/libexec/nginx/ and that you load that module in nginx.conf.

As an example, Apache requires this:
Code:
LoadModule passenger_module /usr/local/lib/ruby/gems/2.3/gems/passenger/buildout/apache2/mod_passenger.so

I'm quite sure nginx would require a similar line in order to load the module.
 
Yes, took care of that days ago. OK, seems that module needed to be called for some reason. It was in my nginx.conf but commented out.

OK, things seem like something resembling normal. Cheers.
 
OK, seems that module needed to be called for some reason.
I'm not sure why this is though, I can remember nginx automatically loading installed modules but since a couple of versions ago you need to explicitly load them in the configuration.
 
That's exactly it. I was confused on the necessity to call modules. In all cases such as this, I don't mind this changing, as long as it gets my attention quickly through documentation, or in any error feedback. Otherwise I spend days chasing single lines like this.
 
Typically errors like 'unknown directive' means a specific module isn't loaded (or failed to load for some reason). You'll get similar errors in Apache if you forget to load a module. So it was fairly quickly fixed. But it was definitely an unexpected change in behavior.
 
Back
Top