I need to use the ffi gem to access native extensions. When I require 'ffi' in a simple ruby script, then it works fine. But when I require ffi in my Rails application, then I get: cannot load such file -- ffi Why?
gem env shows this:
RubyGems Environment:
- RUBYGEMS VERSION: 2.2.2
- RUBY VERSION: 1.9.3 (2012-04-20 patchlevel 194) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/bin/ruby1.9.1
- EXECUTABLE DIRECTORY: /usr/bin
- SPEC CACHE DIRECTORY: /home/adminuser/.gem/specs
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.9.1
- /home/adminuser/.gem/ruby/1.9.1