check processes running mac grep rails 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