I've been following the Flutter install doc at https://docs.flutter.dev/get-started/install/macos/mobile-ios.
When trying to install cocoapods using "sudo gem install cocoapods", I get that "the last version of (SOME APP; VARIES) to support your Ruby & RubyGems was (VERSION). ... (SAID APP) requires Ruby version >= 3.1.0. The current ruby version is 2.6.10.210."
So I thought I should update rubygems.
At rubygems.org, "gem 'algolia', '~> 3.15', '>= 3.15.4'" is not recognized in Terminal ("unknown command algolia"). If I go straight to "gem install algolia" I get the first error again.
Any help would be appreciated.
sudo
when installing gems. For CocoaPods, it's only necessary when using system Ruby. Since you are installing your own Ruby (as recommended), you can/should usegem install cocoapods
as shown in the install guide.