I have a problem when I want to start my server in my terminal I do rail s
or rails server
and there is an error A server is already running. Check /Users/baptiste/code/BaptisteB/my-app/tmp/pids/server.pid.
What does it mean? And why it is present?
I delete it and when I check my localhost:3000
. There is nothing. I have to log off my laptop and turn on it to begin to work.
How could I stop this error? Maybe I can destroy it with a command. Thank you for your help.
Try to run below command on your terminal and you will get pid (process id)
lsof -wni tcp:3000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ruby 21309 user 11u IPv4 93186 0t0 TCP *:3000 (LISTEN)
and then kill your ruby process by using
kill -9 <PID>
start your server again by rails s
Hope it helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With