Rails: A server is already running.
Nov 25, 2021
Sometimes, when you run rails server
or rails s
, it ends up with this error
A server is already running.
This is because you’ve left a server in suspended status. The shortest solution is to kill this process starting the server again. Run these commands to do this
To kill the process (suspended server)
sudo kill -9 $(lsof -i :3000 -t)
Then run the server with
rails s