$rails s , command has a -d (detach) option to let run your application run as a daemon and to stop this process you need to kill the process. Given below is a small shell command that will find the process id of our rails application and kill it for us.
kill $(lsof -i :3000 -t)
The meaning of the above command is to find the process id of the process which is running in portnumber 3000 and send to it the KILL signal.
A handy little command, which has not technical importance, but nice to know.
Issued in the interest of new and novice programmers.. 🙂