下面的教程都基于终端运行(命令行)
先更新一下ruby
curl -L https://get.rvm.io | bash -s stable
如果提示
* WARNING: You have '~/.profile' file, you might want to load it,
to do that add the following line to '/Users/xxxxx/.bash_profile':
source ~/.profile
* No new notes to display.
按提示在终端中输入命令,使默认配置生效
source ~/.profile
查看所有版本
rvm list known
往上找到# MRI Rubies 然后看一下ruby最新的版本是多少
接下来安装ruby最新版本
rvm install 您所看到的最新版本号
指定ruby默认版本
rvm use 最新版本号 --default
接下来查看一下版本号看看是不是最新的
ruby -v
然后我们更新RubyGems版本 需要翻墙
gem update --system
查看一下地址
gem sources -l
*** CURRENT SOURCES ***
https://gems.ruby-china.com/
然后我们移除一下 *** CURRENT SOURCES *** 下面出现的地址,一个一个移除
例如:gem sources --remove https://gems.ruby-china.com/
然后我们需要重新添加一下最新的镜像地址
gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
我们再查看一下存放的镜像地址是否只有 https://rubygems.org/
gem sources -l
要是这样的信息显示就对了
*** CURRENT SOURCES ***
https://gems.ruby-china.com/
然后下载OpenSSL
git clone git://git.openssl.org/openssl.git
使用sudo是因为要prefix的访问权限 ;指定 prefix是因为此目录以后使用比较方便
sudo ./config --prefix=/usr/local/openssl
接下来make一下
make
然后安装
make install
接下来就可以安心的安装update_xcode_plugins 基本不会有出现各种错误了
安装
sudo gem install update_xcode_plugins
安装Alcatraz
curl -fsSL https://raw.github.com/supermarin/Alcatraz/master/Scripts/install.sh | sh
然后我们对已经安装的插件更新一下(主要是用来自动配置插件的当前Xcode的DVTPlugInCompatibilityUUID)
update_xcode_plugins
接下来签名一下我们的xcode 可以上下方向选择自己的Xcode因为我的只有一个Xcode直接回车 按Y就行
update_xcode_plugins --unsign
打开Xcode 点击“Load Bundle”Window就有Package Manager了,可以随便浪随便造随便安装自己需要的插件了。
装完插件后 command+Q彻底退出Xcode,到命令行执行 还是老套路主要是为了自动适配到Xcode上
update_xcode_plugins
执行完后打开Xcode 点击“Load Bundle” 就完美了。
由于已经装好了就不配图了,找个机会格式化下电脑重新配图,以后用Alcatraz装好插件后退出Xcode直接update_xcode_plugins 一下点击“Load Bundle” 就可以了。