If you type rails s
Address already in use - bind(2) for 127.0.0.1:3000 (Errno::EADDRINUSE)
Sometimes the local server didn't work. This means that I have used No. 3000 elsewhere, so I will not be able to start up, so I will cut it.
Check the ID of the process running on port 3000.
＄ lsof -i :3000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ruby 24301 ubuntu 6u IPv4 161869 0t0 TCP *:3000 (LISTEN)
It comes out like this.
In this case
＄ kill -9 24301
You can stop the process if you do, so try rails s again.