萬盛學電腦網

 萬盛學電腦網 >> 網絡編程 >> ios >> OS X升級到10.10之後使用pod出現問題的解決方法

OS X升級到10.10之後使用pod出現問題的解決方法

 最新對mac 10.10的強大功能好奇,於是將系統升級到了10.10,結果發現使用pod出現了下面的問題:    
  1. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- xcodeproj/prebuilt/universal.x86_64-darwin14-2.0.0/xcodeproj_ext (LoadError)  
  2.     from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'  
  3.     from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj/ext.rb:6:in `rescue in <top (required)>'  
  4.     from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj/ext.rb:3:in `<top (required)>'  
  5.     from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'  
  6.     from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'  
  7.     from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj.rb:30:in `<top (required)>'  
  8.     from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'  
  9.     from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'  
  10.     from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.33.1/lib/cocoapods.rb:2:in `<top (required)>'  
  11.     from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'  
  12.     from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'  
  13.     from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.33.1/bin/pod:32:in `<top (required)>'  
  14.     from /usr/bin/pod:23:in `load'  
  15.     from /usr/bin/pod:23:in `<main>'  

 

 

經過一番亂搜,具體的解決步驟如下:

  1. 打開 Xcode 6
  2. 進入 Preferences
  3. 點擊Locations選項
  4. 將 Command Line Tools 版本變成 Xcode 6.0
  5. 卸載 cocoapods,在終端中輸入 

 
  1. $ sudo gem uninstall cocoapods  



  6. 安裝xcodeproj,在終端中輸入


   
  1. $ sudo gem install xcodeproj  



  7. 安裝cocoapods,在終端中輸入


   
  1. $ sudo gem install cocoapods  



  8. 測試pod是否安裝成功,在終端中輸入

 
  1. $ pod --version   
copyright © 萬盛學電腦網 all rights reserved