I'm not sure why but Puma >= v5 won't run rails as a daemon if RAILS_ENV=development
.
To work around it, either set RAILS_ENV=production
in your start script, or if you need to run in dev mode then do as follows:
- Remove the
-d
flag from the rails command in your app's start
script, eg:
LD_LIBRARY_PATH=/opt/lib GEM_HOME=$HOME/apps/app_name/env $PROJECTDIR/bin/bundle exec rails s -e $RAILS_ENV -p $APP_PORT -P $PIDFILE
- Start the app via
daemonize
, eg:
daemonize ~/apps/name_of_app/start
This issue is one of the reasons we haven't rolled out a Rails 7 installer just yet, but we expect to have that solved soon 🙂