RightPopen allows running external processes aynchronously while still capturing their standard and error outputs. It relies on EventMachine for most of its internal mechanisms. The Linux implementation is valid for any Linux platform but there is also a native implementation for Windows platforms.
Gemfile gem 'right_popen', '~> 1.0.3'
install gem install right_popen -v 1.0.3