Reputation: 2056
I can't seem to get Passenger
loaded on FreeBSD 11.1
after many retries. I have deinstalled
nginx completely. I've set the config to install Passenger
and the install says 5.3.4 goes just fine. I even get this security report:
This port has installed the following files which may act as network
servers and may therefore pose a remote security risk to the system.
/usr/local/sbin/nginx
/usr/local/libexec/nginx/ngx_http_passenger_module.so
Then I test the system for any Passenger
feedback I can get, knowing it changes every time I try to install it. I have a bash
script with the following:
passenger-config --ruby-command
passenger-config --root
passenger-config validate-install
passenger-config system-metrics
passenger-config compile-agent
passenger-config --make-locations-ini
bundle exec passenger-status
passenger-status
passenger status
With the output:
passenger_help.sh: line 7: passenger-config: command not found
passenger_help.sh: line 8: passenger-config: command not found
passenger_help.sh: line 9: passenger-config: command not found
passenger_help.sh: line 10: passenger-config: command not found
passenger_help.sh: line 11: passenger-config: command not found
passenger_help.sh: line 12: passenger-config: command not found
bundler: command not found: passenger-status
Install missing gem executables with `bundle install`
passenger_help.sh: line 14: passenger-status: command not found
passenger_help.sh: line 15: passenger: command not found
I expect the config
to steer the make
into installing a proper Passenger
, but it doesn't get installed at all. Am I to use another package? Fusion's website doesn't say anything about FreeBSD
specifically. I'm at a loss as to how to get this working.
Any advice appreciated how I can get this working properly. Cheers
Upvotes: 0
Views: 726
Reputation: 5290
as fare as i use passenger with nginx there is no fully supported pkg. the following steps are necessary
portsnap fetch extract [or]
portsnap fetch update
cd /usr/ports/www/nginx
make config # select passenger!
make install clean # is installing nginx with passenger support
# this command installs ruby gem sources
gem install passenger
# change to ruby gem files and compile the nginx module
cd /usr/local/lib/ruby/gems/2.4/gems/passenger-???
rake nginx:as_dynamic_module
then add the following line on top of
# /usr/local/etc/nginx/nginx.conf
load_module /usr/local/libexec/nginx/ngx_http_passenger_module.so;
http {
passenger_root /usr/local/lib/ruby/gems/2.4/gems/passenger-5.3.7;
passenger_ruby /usr/local/bin/ruby;
passenger_load_shell_envvars off;
passenger_sticky_sessions on;
...
}
and inside a site definition add the following lines
# /usr/local/etc/nginx/sites/default.conf
server {
listen 80;
server_name ... ;
passenger_enabled on;
passenger_min_instances 1;
rails_app_spawner_idle_time 0;
# rails_env development;
...
}
Upvotes: 1