Ruby-FFI is a ruby extension for programmatically loading dynamic libraries, binding functions within them, and calling those functions from Ruby code. Moreover, a Ruby-FFI extension works without changes on Ruby and JRuby. Discover why should you write your next extension using Ruby-FFI here[http://wiki.github.com/ffi/ffi/why-use-ffi].
Gemfile gem 'ffi', '~> 1.0.1'
install gem install ffi -v 1.0.1