无法在任何来源中找到ffi

时间:2015-09-08 20:46:47

标签: ruby ruby-on-rails-4 rubygems bundler ffi

在OS X 10.9.5上......

的Gemfile

source 'https://rubygems.org'

gem 'rails', '4.2.0'
gem 'sass-rails', '5.0.4'
gem 'uglifier', '2.7.2'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.5'
gem 'turbolinks', '2.5.3'
gem 'jbuilder', '2.3.1'
gem 'sdoc', '0.4.1', group: :doc
gem 'mongoid', '4.0.2'
gem 'mongoid-grid_fs', '2.1.0'
gem 'watir-rails', '1.1.0'

group :development, :test do
  gem 'byebug', '6.0.2'
  gem 'web-console', '2.2.1'
  gem 'spring', '1.3.6'
end

终端

$ bundle install
...
Installing ffi 1.9.10 with native extensions
...
Bundle complete! 14 Gemfile dependencies, 68 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
$ bundle show ffi
/Users/me/.rvm/gems/ruby-2.2.2/gems/ffi-1.9.10
$ rails c
Could not find ffi-1.9.10 in any of the sources
Run `bundle install` to install missing gems

我尝试放置" gem' ffi',' 1.9.10'"在我的Gemfile中。

我尝试删除我的Gemfile.lock并重复此过程。

我尝试了bundle exec rails c

我尝试gem install ffi --version 1.0.11,这似乎是childprocess-0.5.6的依赖。

这些尝试都没有任何区别。有什么想法吗?

1 个答案:

答案 0 :(得分:1)

我刚刚遇到同样的错误,用gem pristine --all

解决了