why do i get Error installing cocoapods every time?

124 Views Asked by At

Trying to work download flutter on mac ,and when i run flutter doctor i get error at xcode that says CocoaPods not installed

so i tried downloading it with "sudo gem install cocoapods"
and i get this error

Error installing cocoapods:
    There are no versions of cocoapods-downloader (>= 2.0) compatible with your Ruby & RubyGems. Maybe try installing an older version of the gem you're looking for?
    cocoapods-downloader requires Ruby version >= 2.7.4. The current ruby version is 2.6.10.210.

What can I do?

Installing cocoapods
i expected it work

1

There are 1 best solutions below

0
On

In my case it helped:

brew install cocoapods

and

brew link cocoapods