cover-image

Fail to install cocoapods to M2 Mac

ERROR:  Error installing cocoapods:
  The last version of activesupport (>= 5.0, < 8) to support your Ruby & RubyGems was 6.1.7.6. Try installing it with `gem install activesupport -v 6.1.7.6` and then running the current command again
  activesupport requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210.

Ruby 2.6.10ではダメみたい。

$ brew install rbenv
# Add this to .zshrc or .bash_profile
eval "$(rbenv init - zsh)"

$ rbenv install --list
$ rbenv install 3.1.4
$ rbenv global 3.1.4
$ sudo gem install cocoapods