I was trying to create a new rails app and got this error:
Address already in use – bind(2) for “127.0.0.1” port 3000 (Errno::EADDRINUSE)
To fix it I first check which process used my port 3000:
1 |
lsof -wni tcp:3000 |
And I got this output:
So now I can stopped it using its pid:
1 |
kill -9 13901 |
I checked again if something was running in my port 3000 and I didn’t get any output so I run my rails s command and everything worked fine!