When i try to initialize pod file to use cocoapods
via terminal, it gives me this error. How to fix it.
/Library/Ruby/Gems/2.0.0/gems/cocoapods-
You need to set command line tool version, in Xcode:
You can download latest command line tool from Apple Download Portal, if you have paid apple developer account/id.
Here are current beta and stable Xcode Tool and supporting command line tool download link. (Ensure you'are logged in using premium developer account on Apple Developer Account to access these links)
Xcode 11
Xcode 11.2 beta 2
- (Command Line Tool (Xcode 11.2 beta 2) - for macOS 10.14)Xcode 11
- (Command Line Tool (Xcode 11) - for macOS 10.14)Xcode 10
Xcode 10.2.1
- (Command Line Tool (Xcode 10.2.1) - for macOS 10.14)Xcode 10.2
- (Command Line Tool (Xcode 10.2) - for macOS 10.14)Xcode 10.1
- (Command Line Tool (Xcode 10.1) - for macOS 10.14)
- (Command Line Tool (Xcode 10.1) - for macOS 10.13)Xcode 10
- (Command Line Tool (Xcode 10) - for macOS 10.14)
- (Command Line Tool (Xcode 10) - for macOS 10.13)
Once you've latest command line tool installed in your system, set it from Xcode Menu.
(Xcode Menu Items) Xcode ▶ Preferences ▶ Location ▶ Command Line Tool ▶ Select appropriate command line tool
Hey this might help you!!! I followed this link
https://stackoverflow.com/a/16664135/7905401
After installing command line tools i closed it and opened terminal again now when i checked version git --version it gave me update version 2.10.0 then i ran other commands for cocoapod!! its working!!!!!!!!! yeeeii!!!!
I fixed the problem with next steps:
sudo gem install cocoapods --source http://rubygems.org
after command finish entering new command
pod install
and work for me on xCode 11.2
Sometimes its version issue.
Installing CoacoaPods 1.7.5 did the trick.
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.7.5
pod setup
I encounter the same problem and solve it by using the following command:
sudo xcode-select --switch /Applications/Xcode.app
As the error message in terminal
shows, something with my git
goes wrong. And, it has to do with the command line tool.
If you have upgraded your MAC from the App Store, then you need to run: xcode-select --install
When I ran git --version before running the command above, it didn't find git at all. It displayed this error: missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun. So, I'm guessing when I upgraded my machine somehow I lost git. Regardless, running the above command worked.
I then ran git --version and it showed the git version that was installed.
Reference: http://tips.tutorialhorizon.com/2015/10/01/xcrun-error-invalid-active-developer-path-library-developer-commandline-tools-missing-xcrun/