Reputation: 131
I installed Flutter 2.5.3 on macOS 12.0.1 (Monterey) , I have cocoapods-1.11.2 installed with ruby-3.0.2 set as default. After all these when I run flutter doctor
command I get this result -
Mac-mini ~ % sudo flutter doctor
Woah! You appear to be trying to run flutter as root. We strongly recommend running the flutter tool without superuser privileges. / š Doctor summary (to see all details, run flutter doctor -v): [ā] Flutter (Channel stable, 2.5.3, on macOS 12.0.1 21A559 darwin-x64, locale en-GB)[!] Xcode - develop for iOS and macOS ā 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. To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions. [ā] Chrome - develop for the web [!] Android Studio (not installed) [ā] VS Code (version 1.62.0) [ā] VS Code (version 1.61.2) [ā] Connected device (1 available)
! Doctor found issues in 3 categories. ashishchauhan@Ashishs-Mac-mini ~ % sudo gem which cocoapods
/Users/ashishchauhan/.rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods.rb
After that when I run pod setup
I get this result -
-Mac-mini ~ % pod setup
Setup completed
So the main problem is flutter doctor
command showing as -
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
why this is coming? I have tried installing cocoapods with various versions of ruby.
Upvotes: 2
Views: 2522
Reputation: 623
This could be due to conflict with the leftovers of different Ruby versions.
Library > Ruby
in your finder. All the folders you see inside, delete them.sudo gem install cocoapods
in your terminal. It should reinstall the Ruby and Cocoapods.When done, try flutter doctor
again, and your warning should be resolved.
Upvotes: 1