srinivas biramoni
srinivas biramoni

Reputation: 21

flutter doctor - CocoaPods installed but not working. Tried installing ruby / cocoapods with brew and rvm, still getting same error

Getting below error from flutter doctor.

[!] Xcode - develop for iOS and macOS (Xcode 16.2)
    ✗ CocoaPods installed but not working.
        You appear to have CocoaPods installed but it is not working.
        This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
        This can usually be fixed by re-installing CocoaPods.
      For re-installation instructions, see https://guides.cocoapods.org/using/getting-started.html#installation

Tried below suggested options from ticket# flutter doctor - CocoaPods installed but not working to overcome the issue, but none helped.

Tried by both options, none helped .. still getting same error from "flutter doctor"

Option 1:

1. url -L https://get.rvm.io | bash -s stable
2. rvm install ruby-3.4.2
3. rvm use ruby-3.4.2
4. rvm --default use 3.4.2
5. sudo gem install cocoapods

Option 2:

1. rvm uninstall ruby-3.4.2
2. sudo gem uninstall cocoapods
3. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
4. brew install ruby 
5. updated .zshrc, to point PATH to /opt/homebrew/opt/ruby/bin
6. source ~/.zshrc
7. brew install cocoapods

In both options, validated that ruby version is 3.4.2 by running ruby -v command.

Getting same error and not able to overcome this error. Have been working to overcome it since two days. Any help would be appreciated.

NOTE: Trying to install Flutter as per instructions from https://docs.flutter.dev/get-started/install/macos/mobile-ios on my macbook pro with M2. Getting below error and also showing Install of Rosetta 2 finished successfully, so couldn't understand if it is installed or failed.

sudo softwareupdate --install-rosetta --agree-to-license

Password:
By using the agreetolicense option, you are agreeing that you have run this tool with the license only option and have read and agreed to the terms.
If you do not agree, press CTRL-C and cancel this process immediately.
2025-03-12 03:01:12.577 softwareupdate[1089:11935] Package Authoring Error: 072-70655: Package reference com.apple.pkg.RosettaUpdateAuto is missing installKBytes attribute
Install of Rosetta 2 finished successfully

Tried solution shared in https://www.reddit.com/r/MacOS/comments/rq89is/comment/i2zwy07/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button to overcome the above error, but didn't help. Still getting same error. Not sure if above error is resulting in error from flutter doctor.

Upvotes: 1

Views: 19

Answers (0)

Related Questions