3、编辑/etc/profile,在最末尾添加一行:export PATH=/usr/bin/ruby:$PATH
4、执行source /etc/profile。然后再执行下ruby -v试下
ruby 的命令是可以使用的,可以查看 ruby 的版本输入ruby --version
可以查看到
就是 cocoapods 的任何命令使用不了,
按照网上的教程(https://www.jianshu.com/p/45f2ec14644b)重装,还是使用不了 ,还是报错
Failed to extract git version from ' git --version ' xcrun: error: invalid active developer path
解决方法:到 Git 官网下载 Git安装即可:
https://git-scm.com/download/mac
参考这篇文章 https://www.jianshu.com/p/571fdf4547e5
备注:
重装cocoapods的时候,升级 rvm 的时候 执行 curl -L get.rvm.io | bash -s stable 报错
解决方法:
将上面的命令行改成:\curl -sSL https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer | bash