卸载 cocoaPod : sudo gem uninstall cocoapods
卸载 cocoaPoad 相关的库: gem list --local | grep cocoapods
也可以用这个命令:
gem list --local | grep cocoapods | awk '{print $1}' | xargs sudo gem uninstall
这个命令相当于:
for i in $( gem list --local --no-version | grep cocoapods );
do
gem uninstall $i;
done
卸载指定版本: sudo gem install cocoapods -v 0.39.0
如何更换gem源:
gem sources
gem sources --remove https://rubygems.org/
gem source --add http://ruby.taobao.org/
##安装RVM
官网:https://rvm.io/
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable
第一行安装一个Public
会需要一个 gpg 的东西
gpg是一个软件这里是gpg2,可以使用brew 安装
RVM 使用:
rvm list known
使用rvm 安装2.4 版本的 ruby
rvm install 2.4
rvm use 2.2.0 //切换ruby 版本到2.2.0
Homebrew 完全卸载:
cd `brew --prefix`
rm -rf Cellar$ brew prune
rm -rf Library .git .gitignore bin/brew README.md share/man/man1/brew
rm -rf ~/Library/Caches/Homebrew
重装 Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
卸载Brew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
brew list -1 | xargs brew rm
安装 carthage:
brew install carthage