Cocoapods: pod install fails with ArgumentError - wrong number of arguments (given 2, expected 1). Using json 1.8.6

Created on 29 Dec 2020  ยท  13Comments  ยท  Source: CocoaPods/CocoaPods

Report

What did you do?

bundle update
bundle exec pod install

What did you expect to happen?

Install all pod dependencies correctly.

What happened instead?

Runtime exception

ArgumentError - wrong number of arguments (given 2, expected 1)
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/json-1.8.6/lib/json/common.rb:155:in `initialize'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/json-1.8.6/lib/json/common.rb:155:in `new'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/json-1.8.6/lib/json/common.rb:155:in `parse'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-core-1.10.0/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-core-1.10.0/lib/cocoapods-core/specification.rb:742:in `from_string'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-core-1.10.0/lib/cocoapods-core/specification.rb:716:in `from_file'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-core-1.10.0/lib/cocoapods-core/source.rb:186:in `specification'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-core-1.10.0/lib/cocoapods-core/specification/set.rb:58:in `block in specification_name'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-core-1.10.0/lib/cocoapods-core/specification/set.rb:56:in `each'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-core-1.10.0/lib/cocoapods-core/specification/set.rb:56:in `specification_name'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-core-1.10.0/lib/cocoapods-core/cdn_source.rb:216:in `search'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-core-1.10.0/lib/cocoapods-core/source/aggregate.rb:83:in `block in search'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-core-1.10.0/lib/cocoapods-core/source/aggregate.rb:83:in `select'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-core-1.10.0/lib/cocoapods-core/source/aggregate.rb:83:in `search'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:416:in `create_set_from_sources'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:385:in `find_cached_set'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:360:in `specifications_for_dependency'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:165:in `search_for'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:267:in `each'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:267:in `sort_by'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:53:in `block in sort_dependencies'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:70:in `with_no_such_dependency_error_handling'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:52:in `sort_dependencies'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:288:in `initial_state'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:210:in `start_resolution'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:168:in `resolve'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:94:in `resolve'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:1074:in `block in resolve_dependencies'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:64:in `section'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:414:in `analyze'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:64:in `section'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:160:in `install!'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/command/install.rb:52:in `run'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/command.rb:52:in `run'
/Users/ebiala/.rvm/gems/ruby-3.0.0/gems/cocoapods-1.10.0/bin/pod:55:in `<top (required)>'
/Users/ebiala/.rvm/gems/ruby-3.0.0/bin/pod:23:in `load'
/Users/ebiala/.rvm/gems/ruby-3.0.0/bin/pod:23:in `<main>'
/Users/ebiala/.rvm/gems/ruby-3.0.0/bin/ruby_executable_hooks:24:in `eval'
/Users/ebiala/.rvm/gems/ruby-3.0.0/bin/ruby_executable_hooks:24:in `<main>'

CocoaPods Environment

Stack

   CocoaPods : 1.10.0
        Ruby : ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19]
    RubyGems : 3.2.3
        Host : Mac OS X 10.15.7 (19H114)
       Xcode : 12.2 (12B45b)
         Git : git version 2.29.2.729.g45daf8777d-goog
Ruby lib dir : /Users/ebiala/.rvm/rubies/ruby-3.0.0/lib
Repositories : google - git - https://github.com/google/protobuf.git @ 093faebcdb007f5dfaf11a98d61149f89e8bac23

               grpc - git - https://github.com/grpc/grpc.git @ eff27a6593f4020cab006d2fd8d18a1f0012524a

               master - git - https://github.com/CocoaPods/Specs.git @ 5b1d79c1627a3f6bac5124cc7fd2598a05071e2f

               trunk - CDN - https://cdn.cocoapods.org/

Installation Source

Executable Path: /Users/ebiala/.rvm/gems/ruby-3.0.0/bin/pod

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-trunk       : 1.5.0
cocoapods-try         : 1.2.0

Podfile

platform :ios, '11.0'

project 'myproject'

inhibit_all_warnings!
use_frameworks! :linkage => :static

target 'MyApp' do
  pod 'Firebase/Core'
  pod 'Firebase/Analytics'
  pod 'Firebase/Crashlytics'
  pod 'Firebase/DynamicLinks'
  pod 'Firebase/Performance'

  pod 'GoogleSignIn'
  pod 'FBSDKCoreKit'
  pod 'FBSDKLoginKit'
  pod 'FBSDKShareKit'
  pod 'GoogleToolboxForMac'
  pod 'Google-Mobile-Ads-SDK', '7.62.0'
  pod 'libPhoneNumber-iOS', :git => 'https://github.com/iziz/libPhoneNumber-iOS.git', :tag => '1.0.2'

  pod 'PromisesObjC', :modular_headers => true
  pod 'lottie-ios', :modular_headers => true

  target 'MyTests' do
    pod 'OCMock', :modular_headers => true
    pod 'iOSSnapshotTestCase', :modular_headers => true
  end
end

Most helpful comment

Try forcing gem 'json', '2.3.1' in your Gemfile and bundle install?

This seems a bug in supporting an old version of json gem.

All 13 comments

can you try gem update json to try a newer version?

Here's the output:

$ gem update json
Updating installed gems
Nothing to update

Same with -f

But shouldn't it use the version defined by bundler?

Here's the contents of Gemfile and Gemfile.lock

Gemfile

source "https://rubygems.org"

gem "cocoapods"
gem "fastlane"

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)

Gemfile.lock

  remote: https://rubygems.org/
  specs:
    CFPropertyList (3.0.3)
    activesupport (5.2.4.4)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 0.7, < 2)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
    addressable (2.7.0)
      public_suffix (>= 2.0.2, < 5.0)
    algoliasearch (1.27.5)
      httpclient (~> 2.8, >= 2.8.3)
      json (>= 1.5.1)
    atomos (0.1.3)
    babosa (1.0.2)
    cert (1.4.4)
      fastlane_core (>= 0.55.0, < 1.0.0)
      spaceship (>= 0.37.0, < 1.0.0)
    claide (1.0.3)
    cocoapods (1.10.0)
      addressable (~> 2.6)
      claide (>= 1.0.2, < 2.0)
      cocoapods-core (= 1.10.0)
      cocoapods-deintegrate (>= 1.0.3, < 2.0)
      cocoapods-downloader (>= 1.4.0, < 2.0)
      cocoapods-plugins (>= 1.0.0, < 2.0)
      cocoapods-search (>= 1.0.0, < 2.0)
      cocoapods-trunk (>= 1.4.0, < 2.0)
      cocoapods-try (>= 1.1.0, < 2.0)
      colored2 (~> 3.1)
      escape (~> 0.0.4)
      fourflusher (>= 2.3.0, < 3.0)
      gh_inspector (~> 1.0)
      molinillo (~> 0.6.6)
      nap (~> 1.0)
      ruby-macho (~> 1.4)
      xcodeproj (>= 1.19.0, < 2.0)
    cocoapods-core (1.10.0)
      activesupport (> 5.0, < 6)
      addressable (~> 2.6)
      algoliasearch (~> 1.0)
      concurrent-ruby (~> 1.1)
      fuzzy_match (~> 2.0.4)
      nap (~> 1.0)
      netrc (~> 0.11)
      public_suffix
      typhoeus (~> 1.0)
    cocoapods-deintegrate (1.0.4)
    cocoapods-downloader (1.4.0)
    cocoapods-plugins (1.0.0)
      nap
    cocoapods-search (1.0.0)
    cocoapods-trunk (1.5.0)
      nap (>= 0.8, < 2.0)
      netrc (~> 0.11)
    cocoapods-try (1.2.0)
    colored (1.2)
    colored2 (3.1.2)
    commander (4.5.2)
      highline (~> 2.0.0)
    concurrent-ruby (1.1.7)
    credentials_manager (0.16.4)
      colored
      commander (>= 4.3.5)
      highline (>= 1.7.1)
      security
    deliver (1.16.1)
      credentials_manager (>= 0.16.2, < 1.0.0)
      fastimage (~> 1.6)
      fastlane_core (>= 0.58.0, < 1.0.0)
      plist (>= 3.1.0, < 4.0.0)
      spaceship (>= 0.38.5, < 1.0.0)
    domain_name (0.5.20190701)
      unf (>= 0.0.5, < 1.0.0)
    dotenv (2.7.6)
    escape (0.0.4)
    ethon (0.12.0)
      ffi (>= 1.3.0)
    excon (0.78.1)
    faraday (0.17.3)
      multipart-post (>= 1.2, < 3)
    faraday-cookie_jar (0.0.7)
      faraday (>= 0.8.0)
      http-cookie (~> 1.0.0)
    faraday_middleware (0.14.0)
      faraday (>= 0.7.4, < 1.0)
    fastimage (1.6.8)
      addressable (~> 2.3, >= 2.3.5)
    fastlane (1.92.0)
      addressable (~> 2.3)
      cert (>= 1.4.1, < 2.0.0)
      credentials_manager (>= 0.16.0, < 1.0.0)
      deliver (>= 1.11.3, < 2.0.0)
      fastlane_core (>= 0.44.2, < 1.0.0)
      frameit (>= 2.6.2, < 3.0.0)
      gym (>= 1.6.3, < 2.0.0)
      krausefx-shenzhen (>= 0.14.7)
      match (>= 0.6.0, < 1.0.0)
      multipart-post (~> 2.0.0)
      pem (>= 1.3.1, < 2.0.0)
      pilot (>= 1.7.0, < 2.0.0)
      plist (~> 3.1.0)
      produce (>= 1.1.2, < 2.0.0)
      scan (>= 0.7.1, < 1.0.0)
      screengrab (>= 0.3.2, < 1.0.0)
      sigh (>= 1.8.0, < 2.0.0)
      slack-notifier (~> 1.3)
      snapshot (>= 1.12.1, < 2.0.0)
      spaceship (>= 0.27.1, < 1.0.0)
      supply (>= 0.7.0, < 1.0.0)
      terminal-notifier (~> 1.6.2)
      terminal-table (~> 1.4.5)
      xcode-install (~> 1.4.0)
      xcodeproj (>= 0.20, < 2.0.0)
      xcpretty (>= 0.2.1)
    fastlane-plugin-clean_testflight_testers (0.3.0)
    fastlane_core (0.59.0)
      colored
      commander (>= 4.4.0, <= 5.0.0)
      credentials_manager (>= 0.16.2, < 1.0.0)
      excon (>= 0.45.0, < 1.0)
      gh_inspector (>= 1.0.1, < 2.0.0)
      highline (>= 1.7.2)
      json
      multi_json
      plist (>= 3.1.0, < 4.0.0)
      rubyzip (~> 1.1.6)
      terminal-table (>= 1.4.5, < 2.0.0)
    ffi (1.14.2)
    fourflusher (2.3.1)
    frameit (2.8.0)
      deliver (> 0.3)
      fastimage (~> 1.6.3)
      fastlane_core (>= 0.52.1, < 1.0.0)
      mini_magick (~> 4.5.1)
    fuzzy_match (2.0.4)
    gh_inspector (1.1.3)
    google-api-client (0.9.4)
      addressable (~> 2.3)
      googleauth (~> 0.5)
      httpclient (~> 2.7)
      hurley (~> 0.1)
      memoist (~> 0.11)
      mime-types (>= 1.6)
      representable (~> 2.3.0)
      retriable (~> 2.0)
      thor (~> 0.19)
    googleauth (0.14.0)
      faraday (>= 0.17.3, < 2.0)
      jwt (>= 1.4, < 3.0)
      memoist (~> 0.16)
      multi_json (~> 1.11)
      os (>= 0.9, < 2.0)
      signet (~> 0.14)
    gym (1.12.1)
      fastlane_core (>= 0.57.0, < 1.0.0)
      plist (>= 3.1.0, < 4.0.0)
      rubyzip (>= 1.1.7)
      terminal-table (>= 1.4.5, < 2.0.0)
      xcpretty (>= 0.2.4, < 1.0.0)
    highline (2.0.3)
    http-cookie (1.0.3)
      domain_name (~> 0.5)
    httpclient (2.8.3)
    hurley (0.2)
    i18n (1.8.5)
      concurrent-ruby (~> 1.0)
    json (1.8.6)
    jwt (2.2.2)
    krausefx-shenzhen (0.14.11)
      commander (>= 4.3, < 5.0)
      dotenv (>= 0.7)
      faraday (~> 0.9)
      faraday_middleware (~> 0.9)
      highline (>= 1.7.2)
      json (~> 1.8)
      net-sftp (~> 2.1.2)
      plist (>= 3.1.0, < 4.0.0)
      rubyzip (~> 1.1)
      security (~> 0.1.3)
      terminal-table (~> 1.4.5)
    match (0.11.1)
      cert (>= 1.4.4, < 2.0.0)
      credentials_manager (>= 0.16.2, < 1.0.0)
      fastlane_core (>= 0.58.0, < 1.0.0)
      security
      sigh (>= 1.12.1, < 2.0.0)
      spaceship (>= 0.38.5, < 1.0.0)
    memoist (0.16.2)
    mime-types (3.3.1)
      mime-types-data (~> 3.2015)
    mime-types-data (3.2020.1104)
    mini_magick (4.5.1)
    minitest (5.14.2)
    molinillo (0.6.6)
    multi_json (1.15.0)
    multi_xml (0.6.0)
    multipart-post (2.0.0)
    nanaimo (0.3.0)
    nap (1.1.0)
    net-sftp (2.1.2)
      net-ssh (>= 2.6.5)
    net-ssh (6.1.0)
    netrc (0.11.0)
    os (1.1.1)
    pem (1.4.1)
      fastlane_core (>= 0.58.0, < 1.0.0)
      spaceship (>= 0.38.5, < 1.0.0)
    pilot (1.12.1)
      credentials_manager (>= 0.16.0)
      fastlane_core (>= 0.56.0, < 1.0.0)
      spaceship (>= 0.37.0, < 1.0.0)
      terminal-table (>= 1.4.5, < 2.0.0)
    plist (3.1.0)
    produce (1.3.2)
      fastlane_core (>= 0.57.2, < 1.0.0)
      spaceship (>= 0.38.4, < 1.0.0)
    public_suffix (4.0.6)
    representable (2.3.0)
      uber (~> 0.0.7)
    retriable (2.1.0)
    rouge (2.0.7)
    ruby-macho (1.4.0)
    rubyzip (1.1.7)
    scan (0.14.2)
      fastlane_core (>= 0.57.0, < 1.0.0)
      slack-notifier (~> 1.3)
      terminal-table (>= 1.4.5, < 2.0.0)
      xcpretty (>= 0.2.4, < 1.0.0)
      xcpretty-travis-formatter (>= 0.0.3)
    screengrab (0.5.6)
      fastlane_core (>= 0.55.0, < 1.0.0)
    security (0.1.3)
    sigh (1.12.1)
      fastlane_core (>= 0.57.2, < 1.0.0)
      plist (>= 3.1.0, < 4.0.0)
      spaceship (>= 0.38.4, < 1.0.0)
    signet (0.14.0)
      addressable (~> 2.3)
      faraday (>= 0.17.3, < 2.0)
      jwt (>= 1.5, < 3.0)
      multi_json (~> 1.10)
    slack-notifier (1.5.1)
    snapshot (1.16.4)
      fastimage (~> 1.6.3)
      fastlane_core (>= 0.57.0, < 1.0.0)
      plist (>= 3.1.0, < 4.0.0)
      xcpretty (>= 0.2.4, < 1.0.0)
    spaceship (0.39.0)
      babosa (= 1.0.2)
      colored
      credentials_manager (>= 0.16.0)
      faraday (~> 0.9)
      faraday-cookie_jar (~> 0.0.6)
      faraday_middleware (~> 0.9)
      fastimage (>= 1.6)
      multi_xml (~> 0.5)
      plist (>= 3.1.0, < 4.0.0)
    supply (0.8.0)
      credentials_manager (>= 0.16.0)
      fastlane_core (>= 0.52.0)
      google-api-client (~> 0.9.1)
    terminal-notifier (1.6.3)
    terminal-table (1.4.5)
    thor (0.20.3)
    thread_safe (0.3.6)
    typhoeus (1.4.0)
      ethon (>= 0.9.0)
    tzinfo (1.2.9)
      thread_safe (~> 0.1)
    uber (0.0.15)
    unf (0.1.4)
      unf_ext
    unf_ext (0.0.7.7)
    xcode-install (1.4.0)
      claide (>= 0.9.1, < 1.1.0)
      spaceship (>= 0.25.1, < 1.0.0)
    xcodeproj (1.19.0)
      CFPropertyList (>= 2.3.3, < 4.0)
      atomos (~> 0.1.3)
      claide (>= 1.0.2, < 2.0)
      colored2 (~> 3.1)
      nanaimo (~> 0.3.0)
    xcpretty (0.3.0)
      rouge (~> 2.0.7)
    xcpretty-travis-formatter (0.0.3)
      xcpretty (~> 0.1, >= 0.0.7)

PLATFORMS
  x86_64-darwin-19

DEPENDENCIES
  cocoapods
  fastlane
  fastlane-plugin-clean_testflight_testers

BUNDLED WITH
   2.2.3

Try forcing gem 'json', '2.3.1' in your Gemfile and bundle install?

This seems a bug in supporting an old version of json gem.

Thanks. So after adding that to the Gemfile the bundle install worked, however pod install and also bundle update fail:

โฏ bundle exec pod install
bundler: failed to load command: pod (/Users/ebiala/.gem/bin/pod)
LoadError: dlopen(/Users/ebiala/.gem/gems/ffi-1.12.2/lib/ffi_c.bundle, 0x0009): dependent dylib '/usr/local/opt/gmp/lib/libgmp.10.dylib' not found for '/Users/ebiala/.rbenv/versions/2.6.4/lib/libruby.2.6.dylib' - /Users/ebiala/.gem/gems/ffi-1.12.2/lib/ffi_c.bundle
  /Users/ebiala/.gem/gems/ffi-1.12.2/lib/ffi.rb:6:in `require'
  /Users/ebiala/.gem/gems/ffi-1.12.2/lib/ffi.rb:6:in `rescue in <top (required)>'
  /Users/ebiala/.gem/gems/ffi-1.12.2/lib/ffi.rb:3:in `<top (required)>'
  /Users/ebiala/.gem/gems/ethon-0.12.0/lib/ethon.rb:2:in `require'
  /Users/ebiala/.gem/gems/ethon-0.12.0/lib/ethon.rb:2:in `<top (required)>'
  /Users/ebiala/.gem/gems/typhoeus-1.3.1/lib/typhoeus.rb:2:in `require'
  /Users/ebiala/.gem/gems/typhoeus-1.3.1/lib/typhoeus.rb:2:in `<top (required)>'
  /Users/ebiala/.gem/gems/cocoapods-1.9.1/lib/cocoapods/sources_manager.rb:5:in `require'
  /Users/ebiala/.gem/gems/cocoapods-1.9.1/lib/cocoapods/sources_manager.rb:5:in `<top (required)>'
  /Users/ebiala/.gem/gems/cocoapods-1.9.1/lib/cocoapods/core_overrides.rb:1:in `require'
  /Users/ebiala/.gem/gems/cocoapods-1.9.1/lib/cocoapods/core_overrides.rb:1:in `<top (required)>'
  /Users/ebiala/.gem/gems/cocoapods-1.9.1/lib/cocoapods.rb:75:in `require'
  /Users/ebiala/.gem/gems/cocoapods-1.9.1/lib/cocoapods.rb:75:in `<module:Pod>'
  /Users/ebiala/.gem/gems/cocoapods-1.9.1/lib/cocoapods.rb:17:in `<top (required)>'
  /Users/ebiala/.gem/gems/cocoapods-1.9.1/bin/pod:36:in `require'
  /Users/ebiala/.gem/gems/cocoapods-1.9.1/bin/pod:36:in `<top (required)>'
  /Users/ebiala/.gem/bin/pod:23:in `load'
  /Users/ebiala/.gem/bin/pod:23:in `<top (required)>'


โฏ bundle update
Ignoring digest-crc-0.6.3 because its extensions are not built. Try: gem pristine digest-crc --version 0.6.3
Ignoring ffi-1.14.2 because its extensions are not built. Try: gem pristine ffi --version 1.14.2
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies........
Using rake 13.0.3 (was 13.0.1)
Using CFPropertyList 3.0.3 (was 3.0.2)
Using concurrent-ruby 1.1.7 (was 1.1.6)
Using i18n 1.8.5 (was 0.9.5)
Using minitest 5.14.2 (was 5.14.0)
Using thread_safe 0.3.6
Using tzinfo 1.2.9 (was 1.2.6)
Using activesupport 5.2.4.4 (was 4.2.11.1)
Using public_suffix 4.0.6
Using addressable 2.7.0
Using httpclient 2.8.3
Using json 2.3.1
Using algoliasearch 1.27.5 (was 1.27.1)
Using atomos 0.1.3
Using aws-eventstream 1.1.0
Using aws-partitions 1.413.0 (was 1.365.0)
Using aws-sigv4 1.2.2
Using jmespath 1.4.0
Using aws-sdk-core 3.110.0 (was 3.105.0)
Using aws-sdk-kms 1.40.0 (was 1.37.0)
Using aws-sdk-s3 1.87.0 (was 1.79.1)
Using babosa 1.0.4 (was 1.0.3)
Using bundler 2.1.4
Using claide 1.0.3
Using fuzzy_match 2.0.4
Using nap 1.1.0
Using netrc 0.11.0
Fetching ffi 1.14.2 (was 1.12.2)
Installing ffi 1.14.2 (was 1.12.2) with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/ebiala/.gem/gems/ffi-1.14.2/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /Library/Ruby/Site/2.6.0 -r ./siteconf20201229-70077-1i1yhk6.rb extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
    --with-ffi_c-dir
    --without-ffi_c-dir
    --with-ffi_c-include
    --without-ffi_c-include=${ffi_c-dir}/include
    --with-ffi_c-lib
    --without-ffi_c-lib=${ffi_c-dir}/lib
    --enable-system-libffi
    --disable-system-libffi
    --with-libffi-config
    --without-libffi-config
    --with-pkg-config
    --without-pkg-config
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in `block in try_link0'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in `try_link0'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in `try_link'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:672:in `try_ldflags'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1832:in `pkg_config'
    from extconf.rb:9:in `system_libffi_usable?'
    from extconf.rb:42:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Users/ebiala/.gem/extensions/universal-darwin-19/2.6.0/ffi-1.14.2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/ebiala/.gem/gems/ffi-1.14.2 for inspection.
Results logged to /Users/ebiala/.gem/extensions/universal-darwin-19/2.6.0/ffi-1.14.2/gem_make.out

An error occurred while installing ffi (1.14.2), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.14.2' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  cocoapods was resolved to 1.10.0, which depends on
    cocoapods-core was resolved to 1.10.0, which depends on
      typhoeus was resolved to 1.4.0, which depends on
        ethon was resolved to 0.12.0, which depends on
          ffi

I'm not using Apple Silicon, it seems #9907 is specific to that?
Thanks for helping btw, I'm getting frustrated to a point where I think it may be faster to re-image my machine to start fresh, I feel like I did something I shouldn't have but I'm not sure what

@eytanbiala the issue started with apple silicon but there are workarounds for others without apple silicon. See https://github.com/CocoaPods/CocoaPods/issues?q=is%3Aissue+ffi related issues.

Basically try to get gem install ffi to work and then hopefully things should work.

@dnkoutso unfortunately your proposed solution was not working for me. I have same issue and Im not on M1

 COMMAND:

pod install

FAILED with ERROR:

### Error
ArgumentError - wrong number of arguments (given 2, expected 1)
/Users/romanhosek/.rvm/gems/ruby-2.3.7/gems/nanaimo-0.2.6/lib/nanaimo/writer.rb:35:in `initialize'
/Users/romanhosek/.rvm/gems/ruby-2.3.7/gems/nanaimo-0.2.6/lib/nanaimo/writer/pbxproj.rb:13:in `initialize'
/Users/romanhosek/.rvm/gems/ruby-2.3.7/gems/xcodeproj-1.17.0/lib/xcodeproj/project.rb:364:in `new'
/Users/romanhosek/.rvm/gems/ruby-2.3.7/gems/xcodeproj-1.17.0/lib/xcodeproj/project.rb:364:in `block in save'
/Users/romanhosek/.rvm/gems/ruby-2.3.7/gems/atomos-0.1.3/lib/atomos.rb:21:in `block in atomic_write'

pod update

FAILED with ERROR:

### Error

SyntaxError - /Users/romanhosek/.rvm/gems/ruby-2.3.7/gems/mime-types-3.3/lib/mime/types/logger.rb:30: _1 is reserved for numbered parameter
/Users/romanhosek/.rvm/gems/ruby-2.3.7/gems/mime-types-3.3/lib/mime/types/logger.rb:30: _2 is reserved for numbered parameter
/Users/romanhosek/.rvm/gems/ruby-2.3.7/gems/mime-types-3.3/lib/mime/types/logger.rb:30: _3 is reserved for numbered parameter
<internal:/usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/usr/local/Cellar/ruby/3.0.0_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
/Users/romanhosek/.rvm/gems/ruby-2.3.7/gems/mime-types-3.3/lib/mime/types.rb:229:in `<top (required)>'

Update your ruby version?

try gem update xcodeproj and gem update nanaimo

I reinstalled Ruby yesterday, but gem update xcodeproj worked, thank you!!!

Going to close this for now as the original issue is no longer the same and it is now about ffi.

try

brew upgrade libffi
export LDFLAGS="-L/usr/local/opt/libffi/lib"
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"

Or

gem install ffi -- --enable-system-libffi
Was this page helpful?
0 / 5 - 0 ratings