卸載 cocoaPod : sudo gem uninstall cocoapods
卸載 cocoaPoad 相關(guān)的庫: gem list --local | grep cocoapods
也可以用這個(gè)命令:
?gem list --local | grep cocoapods | awk '{print $1}' | xargs sudo gem uninstall
這個(gè)命令相當(dāng)于:
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
官網(wǎng):https://rvm.io/
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable
第一行安裝一個(gè)Public
會(huì)需要一個(gè) gpg 的東西?
gpg是一個(gè)軟件這里是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