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 rails
to 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:
ps auxw | grep ruby
ps auxw | grep rails`
This is the output of the first one:
greg 14461 0.3 0.7 2483432 15000 s001 S+ 10:10PM 1:03.43 /Users/greg/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
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 14461
would kill it. Or, like above the killall
command will do it by searching for apps with rails
in the name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With