Why do I get cannot load such file?
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:
Add this line in your Gemfile:
gem 'ffi'
Next:
$ bundle install
Now:
require 'ffi'
You need to specify which gem you are going to use in your Gemfile in order to make it available for your Rails project with bundler.
UPDATE : I'd encourage you to checkout How does bundler bundle, how bundler require gems, and this railscast.
链接地址: http://www.djcxy.com/p/63332.html上一篇: Redmine无法启动500错误
下一篇: 为什么我无法加载这样的文件?