Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 在任何来源中都找不到ffi_Ruby_Ruby On Rails 4_Rubygems_Bundler_Ffi - Fatal编程技术网

Ruby 在任何来源中都找不到ffi

Ruby 在任何来源中都找不到ffi,ruby,ruby-on-rails-4,rubygems,bundler,ffi,Ruby,Ruby On Rails 4,Rubygems,Bundler,Ffi,在OSX10.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', g

在OSX10.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'”放在我的gem文件中

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

我尝试了
bundle exec rails c

我尝试了
gem安装ffi——版本1.0.11
,它似乎是childprocess-0.5.6的依赖项


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

我刚才遇到了同样的错误,用
gem pristine解决了--所有的

我的应用程序仍然很简单,所以我用所有相同的代码创建了一个新的应用程序,我不再有这个问题。我仍然很想知道是什么原因造成的,或者如何解决。将来可能无法重新创建应用程序。