[Ruby] What to do if you run Rails s and see Address already in use

less than 1 minute read

Record this error encountered while creating the application

What I want to solve

do rails s

Address already in use-bind(2) for "127.0.0.1" port 3000 (Errno::EADDRINUSE)

I can not run rails s because it is displayed in the terminal

Solution

Check if rails s is already running on another terminal.

If you can’t see that rails s is running

terminal


% ps ax | grep rails

Enter the process number that came out

terminal


% Kill -9 process number

It can be solved by stopping the process with.