Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How come running `rails s` as daemon doesn't start Puma?

When I run rails s -e production -p 9292 (normal case), I get:

=> Booting Puma
=> Rails 5.1.1 application starting in production on http://0.0.0.0:9292
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.8.2 (ruby 2.3.0-p0), codename: Sassy Salamander
* Min threads: 5, max threads: 5
* Environment: production
* Listening on tcp://0.0.0.0:9292
Use Ctrl-C to stop

When I run rails s -d -e production -p 9292 (as daemon), I get:

=> Booting Puma
=> Rails 5.1.1 application starting in production on http://0.0.0.0:9292
=> Run `rails server -h` for more startup options

That's it. I would need to run bundle exec puma -e production -p 9292 --pidfile tmp/pids/puma.pid -d to get the 2nd part:

Puma starting in single mode...
...

Also where are my Puma logs? I see a blank production.log in my log folder and no other log files.

Background context: When I run curl 0.0.0.0:9292 after running both rails and puma as daemons, I get the error An unhandled lowlevel error occurred. The application logs may have details.

like image 928
Sticky Avatar asked Jan 27 '26 15:01

Sticky


1 Answers

rails s -e production -p 9292 -d
like image 85
Anand Avatar answered Jan 29 '26 04:01

Anand



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!