skip to Main Content

I have tried sudo gem install -n /opt/homebrew/opt/[email protected]/bin ffi cocoapods and brew install cocoapods but to no avail.

Any help will be appreciated.

The following is my error:

`
✖ Installing CocoaPods dependencies (this may take a few minutes)
error bundler: failed to load command: pod (/Users/cadyli/Desktop/software projects/ecoexplorer/vendor/bundle/ruby/3.2.0/bin/pod)
/Users/ana/Desktop/software projects/ecoexplorer/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.0/lib/active_support/core_ext/array/conversions.rb:108:in `<class:Array>': undefined method `deprecator' for ActiveSupport:Module (NoMethodError)

  deprecate to_default_s: :to_s, deprecator: ActiveSupport.deprecator
                                                          ^^^^^^^^^^^
Did you mean?  deprecate_constant
    from /Users/ana/Desktop/software projects/ecoexplorer/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.0/lib/active_support/core_ext/array/conversions.rb:8:in `<top (required)>'
    from <internal:/opt/homebrew/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from <internal:/opt/homebrew/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from /Users/ana/Desktop/software projects/ecoexplorer/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.13.0/lib/cocoapods.rb:9:in `<top (required)>'
    from <internal:/opt/homebrew/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from <internal:/opt/homebrew/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from /Users/ana/Desktop/software projects/ecoexplorer/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.13.0/bin/pod:36:in `<top (required)>'
    from /Users/ana/Desktop/software projects/ecoexplorer/vendor/bundle/ruby/3.2.0/bin/pod:25:in `load'
    from /Users/ana/Desktop/software projects/ecoexplorer/vendor/bundle/ruby/3.2.0/bin/pod:25:in `<top (required)>'
    from /opt/homebrew/lib/ruby/site_ruby/3.2.0/bundler/cli/exec.rb:58:in `load'
    from /opt/homebrew/lib/ruby/site_ruby/3.2.0/bundler/cli/exec.rb:58:in `kernel_load'
    from /opt/homebrew/lib/ruby/site_ruby/3.2.0/bundler/cli/exec.rb:23:in `run'
    from /opt/homebrew/lib/ruby/site_ruby/3.2.0/bundler/cli.rb:492:in `exec'
    from /opt/homebrew/lib/ruby/site_ruby/3.2.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    from /opt/homebrew/lib/ruby/site_ruby/3.2.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    from /opt/homebrew/lib/ruby/site_ruby/3.2.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
    from /opt/homebrew/lib/ruby/site_ruby/3.2.0/bundler/cli.rb:34:in `dispatch'
    from /opt/homebrew/lib/ruby/site_ruby/3.2.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
    from /opt/homebrew/lib/ruby/site_ruby/3.2.0/bundler/cli.rb:28:in `start'
    from /opt/homebrew/Cellar/ruby/3.2.2_1/lib/ruby/gems/3.2.0/gems/bundler-2.4.20/exe/bundle:37:in `block in <top (required)>'
    from /opt/homebrew/lib/ruby/site_ruby/3.2.0/bundler/friendly_errors.rb:117:in `with_friendly_errors'
    from /opt/homebrew/Cellar/ruby/3.2.2_1/lib/ruby/gems/3.2.0/gems/bundler-2.4.20/exe/bundle:29:in `<top (required)>'
    from /opt/homebrew/opt/ruby/bin/bundle:25:in `load'
    from /opt/homebrew/opt/ruby/bin/bundle:25:in `<main>'`

I tried downgrading activesupport to an older version with sudo gem uninstall and then reinstalling, and also using brew to install everything instead.

2

Answers


  1. Uninstall your current active support as such…

    sudo gem uninstall activesupport    
    

    Then install the last stable version…

    sudo gem install activesupport -v 7.0.8    
    

    Then reinstall your cocoapods!

    gem install cocoapods
    
    Login or Signup to reply.
  2. "The problem appears to be that CocoaPods isn’t using an exact version of the activesupport gem and while it needs 7.0.8 it’s pulling in 7.1.0 which breaks things. A workaround I found is to update the Gemfile in the root with the following:

    gem 'activesupport', '~> 7.0', '<= 7.0.8'
    

    Then run in the root

    bundle update --bundler
    

    then in the ios directory

    bundle install 
    

    and

    bundle exec pod install
    

    and everything should work."

    I had the same error and this worked for me 😁

    According to https://github.com/facebook/react-native/issues/39832

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search