how can I run rails server daemon?
Asked Answered
N

2

35

I am new at rails world and need to run my rails test server in daemon mode..

I've noticed that there is a a -d flag but its not working for me..

rails -s -d 

shouldn't it be like this?

Nephridium answered 19/2, 2013 at 17:44 Comment(0)
E
27

it's worth trying the following command

$ rails s -d
Ecru answered 19/2, 2013 at 17:45 Comment(1)
@JKABC 'rails s' is alternate shorthand for 'rails server.' They both do the same thing.Tsosie
W
89

It should be:

rails server --daemon

# to kill the server
kill `cat tmp/pids/server.pid`

# to tail development logs for debugging
tail -f log/development.log
Wagner answered 19/2, 2013 at 17:46 Comment(5)
Please use long option/command names, when giving an advice – novices will appreciate it.Farris
rails s -d is not working for me is there any other update?Adne
Is there anyway to re-attach if you need to debug the logs?Internuncial
@Internuncial You can tail the log file tail -f development.log to debug the logs.Wagner
for me to tail logs: tail -f log/development.logPirogue
E
27

it's worth trying the following command

$ rails s -d
Ecru answered 19/2, 2013 at 17:45 Comment(1)
@JKABC 'rails s' is alternate shorthand for 'rails server.' They both do the same thing.Tsosie

© 2022 - 2024 — McMap. All rights reserved.