In order to terminate a process in Ruby you can use the kill method in the of the Process class in the following way:
pid = 1234
Process.kill("TERM", pid)
If you are using Ruby on Windows you have probably already noticed that Process.kill
does not work correctly.
There are two problems with it: