DEV Community

Discussion on: Rails 7 new production install: from zero to deploy (Ubuntu 20.04 edition)

Collapse
 
kevintriplett profile image
Kevin Triplett • Edited

Also -- very important -- the default passenger instance registry directory is /var/run/passenger-instreg which is blown away after reboot. If passenger can't create that directory, it can't run. There might be something messed up about permissions for my installation, but setting this directory to /tmp solved my problems.

So here's what I had to do:

  1. Edit /etc/nginx/conf.d/mod-http-passenger.conf to revise the directive to passenger_instance_registry_dir /tmp;
  2. Tell Capistrano about this change in deploy.rb with set :passenger_environment_variables, { 'PASSENGER_INSTANCE_REGISTRY_DIR' => '/tmp' }