If you’re an active Rails user in multiple projects like me, you’ll
probably would’ve noticed that at some point, you forgot to turn off
spring in those projects. I wouldn’t
blame you if you haven’t noticed, because it supposed to just work in the
background. ps aux | grep spring | grep -v grep now to check which
spring processes are running:
Turning them all off is nothing fancy, really. It’s just a one-liner in bash:
In a Rails project, I put this code in scripts/kill_spring file
Save the file, chmod +x scripts/kill_spring and now all it takes to kill them all is scripts/kill_spring.
You can also choose to add this somewhere in PATH as well so you could execute from anywhere in the terminal.