I just installed a fresh Apache/Passenger setup on Ubuntu 14.04 and ran into this. I have built this same setup at least a dozen times.
My /etc/apache2/mods-enabled/passenger.conf
:
### Begin automatically installed Phusion Passenger config snippet ###
<IfModule mod_passenger.c>
PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
PassengerDefaultRuby /usr/bin/passenger_free_ruby
</IfModule>
### End automatically installed Phusion Passenger config snippet ###
My /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
:
[locations]
packaging_method=deb
bin_dir=/usr/bin
support_binaries_dir=/usr/lib/passenger/support-binaries
lib_dir=/usr/lib/passenger
helper_scripts_dir=/usr/share/passenger/helper-scripts
resources_dir=/usr/share/passenger
include_dir=/usr/share/passenger/include
doc_dir=/usr/share/doc/passenger
ruby_libdir=/usr/lib/ruby/vendor_ruby
node_libdir=/usr/share/passenger/node
apache2_module_path=/usr/lib/apache2/modules/mod_passenger.so
ruby_extension_source_dir=/usr/share/passenger/ruby_extension_source
nginx_module_source_dir=/usr/share/passenger/ngx_http_passenger_module
So, yeah, the locations.ini absolutly contains Apache configuration information ...but this file is identical on all my machines working or not.
Reinstalling via --reinstall
didn't work ...so I purge
d everything.
sudo apt-get purge passenger passenger-dev \
libapache2-mod-passenger \
apache2 apache2-threaded-dev;
sudo apt-get autoremove;
sudo rm -rf /etc/apache2;
Then reinstalled:
sudo apt-get install apache2 apache2-threaded-dev \
libapache2-mod-passenger;
sudo a2enmod rewrite expires deflate passenger status;
sudo apache2ctl restart;
Validated install:
sudo passenger-config validate-install;
And confirmed that Passenger was running:
sudo passenger-memory-stats;
Then, finally, re-enabled my app's Apache config. One last sudo apache2ctl restart
and I'm happily running!
$ ruby --version
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
$ passenger --version
Phusion Passenger version 5.0.15
sudo apt-get purge passenger passenger-dev apache2
to completely remove all of the packaged and then reinstalled and it worked properly. So, a reinstall was the easiest route. – Joyejoyful