TL;DR: Uninstall the homebrew version of cocoapods, use the gem version instead
Error message was:
/usr/local/bin/pod: /usr/local/Cellar/cocoapods/1.8.4/libexec/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/pod: line 2: /usr/local/Cellar/cocoapods/1.8.4/libexec/bin/pod: Undefined error: 0
The problem seems to be MacOS Ruby version is 2.6.x but cocoapods is trying to use 2.3.
Related issue: CocoaPods/CocoaPods#8955
Tried:
brew unlink cocoapods && brew link cocoapods
🚫 no changebrew install cocoapods --build-from-source && brew link --overwrite cocoapods
🚫 no change
Since it seemed like there was nothing that would work for the homebrew version of cocoapods, I decided to follow other folks on that thread and install the cocoapods gem instead
brew uninstall cocoapods && sudo gem install cocoapods
✅ fix
after that, a pod install
work as expected