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 directory
I followed Ray Wenderlich's guide to install cocoapods and i get this issue so i have no idea what is going on.
I encountered this problem when upgrading to Mac OS High Sierra.
This was my fix:
sudo gem install cocoapods
I found this answer on the CocoaPods issue list on Github.
After upgraded to High Sierra, I got the same error, just reinstalled the cocoapods
sudo gem install -n /usr/local/bin cocoapods
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.
i fixed it by running brew install ruby
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
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
brew link --overwrite cocoapods
On my mac this solved the problem:
brew uninstall cocoapods
brew install cocoapods
Fixed with
brew upgrade cocoapods
In my case nothing of the above worked. I had ruby 2.3.0 installed and I had to downgrade to 2.0.0:
gem update --system 2.0.0
来源:https://stackoverflow.com/questions/31442214/running-pod-set-up-gives-me-bad-interpreter-no-such-file-or-directory