tillda
tillda

Reputation: 18680

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 installed 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?

Upvotes: 1

Views: 2699

Answers (3)

Vamshidhar Behara
Vamshidhar Behara

Reputation: 521

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

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

Upvotes: 0

chifung7
chifung7

Reputation: 2621

I ran into the same problem and solved it by removing the Gemfile.lock and re-run bundle install.

Upvotes: 4

Andy Waite
Andy Waite

Reputation: 11076

Perhaps try 'bundle exec rails generate...'

Upvotes: 0

Related Questions