When trying to start the server with rails s, the following error occurs.
: Address already in use - bind(2) for "127.0.0.1" port 3000 (Errno::EADDRINUSE)
I get angry when port 3000 is used.
$ ps aux | grep puma
The process of 30254 seems to be in the way.
The process of 26491 is the process of the ps aux | grep puma command itself.
shiro            30254   0.0  0.1  4455312  15532   ??  S     2:03PM   0:05.23 puma 3.12.6 (tcp://localhost:3000) [portfolio_01]
shiro            26491   0.0  0.0  4258892    224 s000  R+    9:53PM   0:00.00 grep --color=auto puma
$ kill 30254
A quick way to solve it. I can't recommend it because it's not a fundamental solution, but if you type the following, it will start up in another port.
$ rails s -p 3001
I spent a lot of time on this error when setting up Rails and so on. I will post it in the hope that it will be useful for beginners like me. Please refer.
Recommended Posts