Your bundle is locked to ffi (1.11.0), but that version could not be found in any of the sources listed in your Gemfile

10,909

Solution 1

Delete the bundler version mentioned in your Gemfile.lock

Solution 2

The issue you're hitting is that bundler could not find that version of ffi. You most likely installed it originally when creating the project or adding a gem. The ffi version 1.11.0 was pulled from RubyGems.

Run bundle update on your project to get the latest version, which is 1.11.1 as of today. That should fix your issue as when you deploy next when heroku runs bundler, it will pick up that version from RubyGems.

Solution 3

I had the same issue and bundle update ffi fixed it for me.

Solution 4

Try update in mode conversative your dependencies:

bundle update --conservative ffi

Solution 5

EDIT

In my case it was that the repo was unsupported. I was dealing with multiple dependency hells. I say multiple because there was was RakeFile for the Rainforest project which kicked off multiple other gems/projects/repos with incompatible versions across. At least that's what I've understood. For more see here where a contributor says the repo needs updating


I was following the steps from CocoaPods dev environment setup and when I was doing rake bootstrap I was getting the following error:

Your bundle is locked to codecov (0.1.14), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that
means the author of codecov (0.1.14) has removed it. You'll need to update your bundle to a version other than codecov (0.1.14) that hasn't been removed in order
to install.
rake aborted!
Command failed with status (7): [bundle install...]
/Users/honey/Rainforest/Cork/Rakefile:9:in `block in <top (required)>'

From within my Rainforest directory I tried doing bundle update codecov but I was getting:

Could not locate Gemfile

If you notice you see the error is failing from within a subdirectory of my Rainforest directory ie /Rainforest/Cork.

So I just changed the directory to /Users/honey/Rainforest/Cork where I had a Gemfile and then just ran bundle update codecov. Then I was able to run rake bootstrap from my Rainforest directory


After that fix, still my dev environment wasn't fully setup. The docs say:

To verify that everything is set up, run: CocoaPods/bin/pod --help

When I did that I was getting this error:

Could not find rake-10.5.0 in any of the sources

Run bundle install to install missing gems.

I did an ls and found the following items:

CLAide
CocoaPods
Core
Cork
Molinillo
Nanaimo
README.md
RELEASING.md
Rakefile
Xcodeproj
claide-completion
cocoapods-acknowledgements
cocoapods-deintegrate
cocoapods-docs
cocoapods-downloader
cocoapods-plugins
cocoapods-search
cocoapods-stats
cocoapods-trunk
cocoapods-try
fourflusher
pod-template
shared

Meaning there was no Gemfile in my current directory.

I changed directory into CocoaPods and saw a Gemfile in there. From there I just ran bundle install and then from my original Rainforest directory I was able to run CocoaPods/bin/pod --help successfully.

FWIW when I ran bundle install I got the following warning:

Warning: the running version of Bundler (1.17.2) is older than the version that created the lockfile (1.17.3). We suggest you upgrade to the latest version of Bundler by running gem install bundler.

But that's a problem for another day.

What I understood was that for a library as big as CocoaPods there are multiple gems/projects and each error/warning message that you get is usually in regards to one gem/project and not others and if you change your directory and look into the files in regard to that gem/project then you'll get a better overview of what's going on wrong and where your command need to be ran from.

Share:
10,909

Related videos on Youtube

developing
Author by

developing

Updated on October 13, 2022

Comments

  • developing
    developing over 1 year

    I get this error when starting the rails server: I've tried gem install, gem update, bundle update, bundle install.

    Your bundle is locked to ffi (1.11.0), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of ffi
    (1.11.0) has removed it. You'll need to update your bundle to a version other than ffi (1.11.0) that hasn't been removed in order to install.
    

    can you help? thank you!

    source 'https://rubygems.org'
    ruby '2.5.3'
    
    gem 'bootsnap', require: false
    gem 'jbuilder', '~> 2.0'
    gem 'pg', '~> 0.21'
    gem 'puma'
    gem 'shopify_app'
    gem 'rails', '5.2.3'
    gem 'redis'
    gem 'devise'
    
    gem 'autoprefixer-rails'
    gem 'font-awesome-sass', '~> 5.6.1'
    gem 'sassc-rails'
    gem 'simple_form'
    gem 'uglifier'
    gem 'webpacker'
    
    group :development do
      gem 'web-console', '>= 3.3.0'
    end
    
    group :development, :test do
      gem 'pry-byebug'
      gem 'pry-rails'
      gem 'listen', '~> 3.0.5'
      gem 'spring'
      gem 'spring-watcher-listen', '~> 2.0.0'
      gem 'dotenv-rails'
    
    end
    
    

    this is my rake file:

    require_relative 'config/application'
    
    Rails.application.load_tasks
    
    
  • developing
    developing almost 5 years
    I've deleted bundler (>= 1.3.0) in my Gemfile.lock and it works now, could you maybe explain a little bit about the above reason? many thanks!:)