rails console find and kill server code example
Example 1: rails kill server
kill -9 $(lsof -i tcp:3000 -t)
Example 2: kill rails
lsof -wni tcp:3000
kill -9 PID
kill -9 $(lsof -i tcp:3000 -t)
lsof -wni tcp:3000
kill -9 PID