安装rvm
curl -sSL https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer | bash -s stable
添加rvm到系统path
source ~/.rvm/scripts/rvm
列出安装包
rvm list known
安装ruby.
rvm install ruby-2.6.3
安装成功
ruby -v
输出:ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin16]
升级之后需要重新安装pod
今天pod install后出现了这样一个问题:
Ignoring byebug-10.0.2 because its extensions are not built. Try: gem pristine byebug --version 10.0.2
/Library/Ruby/Site/2.3.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) with executable pod (Gem::GemNotFoundException)
from /Library/Ruby/Site/2.3.0/rubygems.rb:308:in `activate_bin_path'
from /usr/local/bin/pod:23:in `<main>'
估计是我什么时候一不小心把cocoapods删了。
终端输入以下一条命令解决:
sudo gem install -n /usr/local/bin cocoapods
网友评论