I started a “rails server” in my Mac OS X terminal. Supposedly if I just hit Ctrl+c in that terminal, I can shut it down. But I accidentally closed the terminal and now I can’t shut it down.
I started another test project and try “rails server” again, and I got
Address already in use – bind(2) (Errno::EADDRINUSE)” error.
Can anyone help?
You can use
killall -9 railsto kill all running apps with “rails” in the name.The app should have died when the window closed though I have seen Ruby and/or Rails apps stick. You can have the system tell you if any “ruby” or “rails” apps are running with one of these commands:
This is the output of the first one:
You can see the path to the running app which will help identify the job. The number in the second column is the process ID.
kill -9 14461would kill it. Or, like above thekillallcommand will do it by searching for apps withrailsin the name.