简体   繁体   中英

Can't install ffi gem, Rails fail

While creating creating an integration test via rails generate integration_test foo it declined with

Could not find ffi-1.0.9 in any of the sources
Run `bundle install` to install missing gems.

I ran bundle install to install missing gems, but with no success. Still the same error. I have gem 'ffi' in my Gemfile.

I switched the gemfile line to gem 'ffi', :git => 'git://github.com/ffi/ffi.git' and bundle install ed again. It did all sort of stuff and wrote "Your bundle is complete" at the end.

However when I run the rails generate... command again I get:

git://github.com/ffi/ffi.git (at master) is not checked out. Please run 'bundle install'

What the hell is going on with this ffi?

我遇到了同样的问题并通过删除Gemfile.lock并重新运行bundle install来解决它。

bundle install was failing because it could ffi failed with NoMethodError for spec.

Removing Gemfile.lock, empty the gemset and doing bundle install worked.

也许尝试'捆绑exec rails generate ...'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM