recently tried to do pod setup
and i get this:
-bash: /usr/local/bin/pod: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such file or directo
The following worked for me:
Select Command Line Tools in XCode.
XCode > Preferences > Locations > Command Line Tools > XCode 11.X.X In terminal execute: sudo gem install cocoapods -n /usr/local/bin
https://stackoverflow.com/a/60464653
Same issue I was facing when I updated our system from Sierra
to Mojave.
Also works for Catalina
The following steps worked:
sudo gem update --system
sudo gem install -n /usr/local/bin cocoapods
I got the help from the following link.
While I'm trying to install again then I got another error saying that
ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
Then I did this and worked fine.
sudo gem uninstall cocoapods
sudo gem install cocoapods
Fixed with
brew upgrade cocoapods
After upgraded to High Sierra, I got the same error, just reinstalled the cocoapods
sudo gem install -n /usr/local/bin cocoapods
This happened when I upgraded to Catalina. I solved it by running:
sudo gem install -n /usr/local/bin ruby
sudo gem install -n /usr/local/bin cocoapods