[Flutter] CocoaPods Installed But Not Working
Trinh Le
1 min read
When running flutter doctor
return some weird error about CocoaPods
[!] Xcode - develop for iOS and macOS (Xcode 12.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 more info, see https://github.com/flutter/flutter/issues/14293.
To re-install CocoaPods, run:
sudo gem install cocoapods
Install Ruby Version Manager (RVM):
Open Terminal and run:
curl -L
https://get.rvm.io
| bash -s stable
Reopen Terminal to apply changes.
Install Ruby 2.6.5:
- Run:
rvm install ruby-2.6.5
- Run:
Set Ruby 2.6.5 as Default:
Run:
rvm use ruby-2.6.5
Make it persistent:
rvm --default use 2.6.5
Install CocoaPods:
- Run:
sudo gem install cocoapods
- Run:
0
Subscribe to my newsletter
Read articles from Trinh Le directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Trinh Le
Trinh Le
Android Geek ๐จโ๐ป Product Crafter ๐ Backpacker ๐ Climber ๐งโโ๏ธ