“无法提取 git 版本” CocoaPods 使用 Mac

Nat*_*oel 6 ruby xcode cocoapods swift

我需要帮助。我正在尝试将 CocoaPods 安装到我的 mac,当我进入该过程的“pod setup”部分时收到以下错误。有任何想法吗?

Nathans-MacBook-Air:~ nathannoel$ pod setup --verbose

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:118:in 
`git_version': Failed to extract git version from `git --version`
("xcrun: error: invalid active developer path
  (/Applications/Xcode.app/Contents/Developer), missing xcrun at: 
   /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun\n") (RuntimeError)
  from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:130:in 
 `verify_minimum_git_version!'
  from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:49:in `run'
  from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
  from /usr/local/bin/pod:22:in `load'
  from /usr/local/bin/pod:22:in `<main>'

Nathans-MacBook-Air:~ nathannoel$
Run Code Online (Sandbox Code Playgroud)