I am trying to install cocoapods to my MacBook Pro running with OSX 10.9.1 (new Mavericks) and after type gem install cocoapods
I get the following error:
I was facing quite a similar error, and it was my first time installing CocoaPods on macOS Catalina. Finally managed by installing Xcode Commandline Tools. Type in the following command into your Terminal. (As of this day, this file is around 248.3mb)
xcode-select --install
A dialog should appear asking you to approve the download and installation. It might take a while to download depending on your internet speed. Once the installation is successful. Attempt to install CocoaPods once more with the following command in Terminal.
sudo gem install cocoapods
Once complete use the following command to confirm if installation was successful
pod setup --verbose
Alright,
I had the same issue. Tried to install pods to my project but never worked out. I updated Xcode, Updated Command Line tools, reinstalled cocoapods... almost everything.
Sitting on my ass , writing pod in terminal showed up a screen listing available commands.
I read all of them and noticed the command
pod setup
which does
+ setup Setup the CocoaPods environment
After this line of code, my problem was fixed.
I hope my solution help other people in trouble like me.
None of previous solutions worked for me...
My situation is a fresh clean install of macOS Catalina + XCODE;
It happen that I had to first run Xcode before install cocoa pods (in first run, Xcode setups machine with tools);
After that, cocoa pods worked fine.
i had this issue when i tryed to install cocoapods by running the command "sudo gem install cocoapods", but i was able to install it with no problems using brew
First as wrote "Kevin" try to run in terminal:
xcode-select --install
If it doesn't help you download tools manually from apple developer site:
It helped me.
brew reinstall ruby
Add the below to your path
export PATH="/usr/local/opt/ruby/bin:$PATH"
If needed add these flags.
export LDFLAGS="-L/usr/local/opt/ruby/lib"
export CPPFLAGS="-I/usr/local/opt/ruby/include"