How to stop the rails server from the command line?

I had a strange situation when I closed the terminal, but the server continued to work. When I tried to start the server again, I received a message stating that the server is still running. How can I stop the server through the command line?

+4
source share
2 answers

Method 1 : just type: Ctrl + C in the terminal your server is running on.

Way 2 : Another way to do this:

In your terminal, learn the PIDprocess:

$ lsof -wni tcp:3000

Then kill the process:

$ kill -9 PID

3. , rails :

killall -9 rails
+7

Ctrl + C .

+1

Source: https://habr.com/ru/post/1613759/


All Articles