Unable to install Cocoapods on Yosemite DP 7

醉酒当歌 提交于 2019-12-01 07:34:17

I ran into the same issue. After much hair pulling following the same steps as everyone else, the following worked.

  1. $ xcode-select --install (to confirm command line tools are installed)

  2. Installed nvm stable (and homebrew): $ \curl -sSL https://get.rvm.io | bash -s stable

  3. close/reopen terminal

  4. Installed ruby 2.1.2: $ rvm install 2.1

  5. Switch to it: $ rvm use 2.1

  6. Uninstall/reinstall xcodeproj and cocoapods

Xcode 6.0 GM is missing the 10.10 SDK and therefore the gem xcodeproj can't be compiled which has some C code in it which needs the 10.10 SDK. This is going to be fixed in the future. For now you can work around it like this:

  • Terminal: sudo gem uninstall cocoapods xcodeproj
  • Download Xcode 6.1 (right now Beta 2 is the current one)
  • Start it go to Settings -> Location -> Command Line Tools -> Change to Xcode 6.1 Beta
  • Terminal: sudo gem install cocoapods
  • Change your Command Line tools back to GM (if you want/need)

For more information see: https://github.com/CocoaPods/CocoaPods/issues/2432

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!