Puma not creating socket at defined location when started with `rails server` Puma not creating socket at defined location when started with `rails server` nginx nginx

Puma not creating socket at defined location when started with `rails server`


Are you sure you are running Puma with that configuration? I don't think rails server is the proper way to start Puma in a production environment.

I would use this instead:

RACK_ENV=production bundle exec puma -C config/puma.rb

Once you get this working manually, then use the --daemon flag to keep the server running in the background.

Also, where is shared_dir defined in your config/puma.rb? Perhaps you omitted the part of the file, but if not, make sure you insert the correct value.


I had a similar issue, the reason was in the incorrect value of shared_dir. You need to update with following if you want to work it on deploy:

set :puma_bind,-> { "unix://#{shared_path}/tmp/sockets/puma.sock" }set :puma_state, -> { "#{shared_path}/tmp/pids/puma.state" }set :puma_pid, -> { "#{shared_path}/tmp/pids/puma.pid" }

Notice: after this changes you may have a problem with manual runcap production puma:start/stop/restart and you will need to remove -> {.