Linux Search & Kill Group of Processes

0 comments


The following quick command can be used to kill one or more processes found using the combination of ps and grep.
ps -ef | grep FooBar | awk '{print $2}' | xargs kill -9

Ruby Error on Require JSON in Ubuntu

0 comments


Received the following error from a Ruby application when it called require 'json'.

irb(main):002:0> require 'rubygems'
=> true
irb(main):004:0> require 'json'
LoadError: no such file to load -- json
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from (irb):4
from :0
JSON is in the libjson-ruby package. So to fix this
sudo apt-get install libjson-ruby
and presto!
irb(main):001:0> require 'json'
=> true