Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pod file not being initialized?

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-1.2.0/lib/cocoapods/command.rb:128:in `verify_minimum_git_version!': [!] You need at least git version 1.8.5 to use CocoaPods (Pod::Informative)
like image 223
Usama bin Attique Avatar asked Feb 02 '17 07:02

Usama bin Attique


People also ask

How do I uninstall and reinstall my pod?

Just rm -rf that pod's folder, and remove the line from the Podfile. Then run pod install again.

How do I add a pod in Xcode 13?

Run the following commands in terminal: sudo gem update xcodeproj. sudo arch -x86_64 gem install ffi.


3 Answers

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.

like image 156
Guohua Cheng Avatar answered Sep 21 '22 13:09

Guohua Cheng


I was having an issue while trying to install packages using cocoapods. I have tried "sudo xcode-select --switch /Applications/Xcode.app" still getting wrong path error

To fix this

I opened Xcode.

Preferences
Locations
Selected the Command Lin Tools: Xcode 9.0

Now when installing packages with cocoapods I no longer get errors.

like image 41
Joyal Clifford Avatar answered Sep 21 '22 13:09

Joyal Clifford


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

enter image description here

like image 39
Krunal Avatar answered Sep 23 '22 13:09

Krunal