Ruby on rails string search from system command
===

Hello i'm trying to kill process by pid with system('kill -9 @pid')
where @pid is @pid = %x[pidof program firefox] is there any way to do that in ruby?