Pod 操作

更新Pod到最新版本

You can check your current version:

pod --version
0.28.0

Since CocoaPods is a ruby gem you can update it, and all other installed gems, just by:

gem update

On OS X 10.9 you might have to install the Xcode command line developer tools, those are a prerequisite for the whole Ruby shebang to work.

The fastest method to install them, thanks to yanzv for pointing this out.

xcode-select --install

 gem clean .只删除旧版本Pod 

2...  cd到该文件夹

//删除文件夹下的所有 .svn 文件

find . -name ".svn" | xargs rm -Rf

//删除文件夹下的所有 .git 文件

find . -name ".git" | xargs rm -Rf

 

3... nothing added to commit but untracked files present (use "git add" to track))

解决方法:

  $ pod repo remove master

 $ pod setup


如果还不行则重新安装:

  $ sudo su

 上面一步非常重要,否则无法删除cocopods的文件
 $ rm -rf ~/.cocoapods/
 $ pod setup

gem clean 错误

Unable to uninstall gem-wrappers-1.2.4:

Gem::InstallError: gem-wrappers is not installed in GEM_HOME, try:

gem uninstall -i /Users/zhaojiangming/.rvm/gems/ruby-2.1.2@global gem-wrappers

Clean Up Complete

解决方法---   

Tank-Mac:~ zhaojiangming$ rvm gemset use global

Using ruby-2.1.2 with gemset global

pod setup or pod search af erro
gem update --system gem pristine --all

this will update the command "gem" to the newest version. It should resolve that issue for you.

 
原文地址:https://www.cnblogs.com/chinaxxren/p/3523200.html