Mac OS 10.12系统cocoapods安装澳门葡京网站平台

作者:澳门新葡京平台游戏

在执行:$ rvm install 2.2.2

到此,终于在电脑上成功的配置了2.3.0的版本

$pod setup,

run 'brew doctor' and make sure latest '' is installed properly.

Installing fastlane 2.9.0Bundle complete! 2 Gemfile dependencies, 74 gems now installed.Use `bundle show [gemname]` to see where a bundled gem is installedMonSter:

For more information, see and the CHANGELOG for this version at

解决问题:删除原来的安装目录

a、检测已知的ruby版本:  $ rvm list known

MAC 10.12.2 安装cocoapods 方法

Please consider upgrading to ruby-2.3.0 which will have all of the latest security patches.

此时选择需要的版本:$ rvm use 2.3.0(我这需要使用2.3.0)Using /Users/MrLee/.rvm/gems/ruby-2.3.02、开始安装bundler来管理多版本的gemMonSter:~ MrLee$ gem install bundlerFetching: bundler-1.14.6.gem (100%)Successfully installed bundler-1.14.6Parsing documentation for bundler-1.14.6Installing ri documentation for bundler-1.14.6Done installing documentation for bundler after 8 seconds1 gem installedgem

我们需要来修改源(由于国内被墙),所以腰包源切换至ruby-china在终端执行以下命令,以前使用的大部分命令都是下面的情况:

No binary rubies available for: osx/10.12/x86_64/ruby-2.2.2.

RVM version 1.29.1 (latest) is installed yet 1.27.0 (latest) is loaded.Please do one of the following:* 'rvm reload'* open a new shell* 'echo rvm_auto_reload_flag=1 >> ~/.rvmrc' # for auto reload with msg.* 'echo rvm_auto_reload_flag=2 >> ~/.rvmrc' # for silent auto reload.

执行命令:

查看目前所有ruby版本:$rvm list known 如果提示command not found

1、安装rvm管理ruby因为后面需要使用合适的ruby版本,所以需要运用rvm来管理ruby版本。

2.检测RVM是否安装

错误二:

安装成功提示:#  Thank you for using RVM!#  We sincerely hope that RVM helps to make your life easier and more enjoyable!!!

首先换源

请先安装rvm:rvm install 2.2.2 ;

(1)安装rvm终端:curl -L | bash -s stable期间可能会问你sudo管理员密码,以及自动通过homebrew安装依赖包,等待一段时间后就可以成功安装好 RVM。然后,载入 RVM 环境(新开 Termal )

重新安装:

否则,移除现有的ruby:$gem sources --remove sources -a

因为最近项目中要用到不同版本的ruby,并且使用bundler来管理。然后,我又刚刚换了台电脑,各种版本不匹配,各种伤感。把自己的经验跟大家分享一下。

4、更新brew  update

Installing Ruby from source to: /Users/mac/.rvm/rubies/ruby-2.2.2, this may take a while depending on your cpu...

可能会出现下面的错误:A RVM version  () is installed yet 1.25.14 (master) is loaded.Please do one of the following:* 'rvm reload'* open a new shell* 'echo rvm_auto_reload_flag=1 >> ~/.rvmrc' # for auto reload with msg.* 'echo rvm_auto_reload_flag=2 >> ~/.rvmrc' # for silent auto reload.解决方案:sudo rm -rf /users/your_username/.rvmThen close and reopen the terminal.

rvm -v ,如果能显示版本则安装成功

Searching for binary rubies, this might take some time.

PROJECT $ bundle install

cd /usr/local 

Requirements installation successful.

第三波比较明显的反应:ruby-2.3.0 - #downloading ruby-2.3.0, this may take a while depending on your connection...ruby-2.3.0 - #extracting ruby-2.3.0 to /Users/MrLee/.rvm/src/ruby-2.3.0....ruby-2.3.0 - #applying patch /Users/MrLee/.rvm/patches/ruby/changeset_r53419.diff.ruby-2.3.0 - #configuring......................................................|ruby-2.3.0

卸载

rm-rf Cellar Frameworks Homebrew

这个过程可能会耗费相当时间。时间太久了,

说明你应经安装RVM了,否者就要安装了:

$sudo gem install cocoapods

检测成功:MonsterdeMac-mini:~ MonsterLee$ rvm list known

$gem sources -l

$gem sources --remove

$gem sources -a       //这个现在是个大坑啊,会报错:

Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.

  • #post-configuration.ruby-2.3.0 - #compiling................................ruby-2.3.0 - #installing.........ruby-2.3.0 - #making binaries executable..ruby-2.3.0 - #downloading rubygems-2.6.10

可能会碰到:

(3)成功后安装ruby

会出现

ruby-e"$(curl -fsSL )"

(2)检测是否安装成功a、$ rvm -v

使用命令  gem sources - l 来验证你的ruby镜像是并且仅是ruby-china,如果出现以下文字表名你的命令是成功的:

2.1检查ruby版本

安装ruby:执行:$ rvm install 2.3.0Searching for binary rubies, this might take some time.No binary rubies available for: osx/10.11/x86_64/ruby-2.3.0.Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.Checking requirements for osx.Installing requirements for osx.Updating system......../

结果:vm 1.28.0 (latest) by Wayne E. Seguin , Michal Papis []

重新执行安装:

# MRI Rubies[ruby-]1.8.6[-p420][ruby-]1.8.7[-head] # security released on head[ruby-]1.9.1[-p431][ruby-]1.9.2[-p330][ruby-]1.9.3[-p551][ruby-]2.0.0[-p648][ruby-]2.1[.10][ruby-]2.2[.6][ruby-]2.3[.3][ruby-]2.4[.0]ruby-headb、

使用命令:

成功后提示:

第二波比较明显的反应:Installing required packages: autoconf, automake, libtool, pkg-config, coreutils, libyaml, readline, libksba, openssl..........

Checking requirements for osx.

然后我选择了执行:ruby -e "$(curl -fsSL is now at b38c52f Merge pull request #2289 from reitermarkus/cask-refactor-uninstall进入更漫长的等待,当然也有可能是我们公司无力吐槽的网速。

ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]

$ruby -v

第一波比较明显的反应:Installing requirements for osx.Updating system........

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

之后就开始安装cocoapods:$sudo gem install cocoapods

3、项目中安装bundle及相关操作

会提示你让你手动删除文件, 需要你 

*** CURRENT SOURCES ***

PROJECT MrLee$ bundle exec pod install --no-repo-update

如果有选项了,说明你的brew 安装好了

This may have known and unaccounted for security vulnerabilities.

Errno::ECONNRESET: Connection reset by peer - SSL_connect ()

Missing required packages: autoconf automake libtool pkg-config libyaml readline libksba openssl

这是提示我们Brew 需要更新了

==> Installation successful!

使用命令 

运行后有下边提醒,则出现安装成功:

这个问题我在知乎(知乎地址:

Installing ri documentation for cocoapods-1.0.1

这里显示是可以安装2.4 的版本

运行后出现错误

到出现下面的信息,说明你的cocoapods已经安装完毕,可以使用了

ruby-2.2.2 - #downloading ruby-2.2.2, this may take a while depending on your connection...

$sudo gem update --system

$gem sources --remove

$gem sources --remove       //已经安装了淘宝镜像的需要这一步

$gem sources -a

运行结果:

如果低于2.2.2则升级版本:

先运行下面命令: rvm autolibs read-only

5、安装cocoapods

Done installing documentation for nap, fourflusher, escape, colored, concurrent-ruby, thread_safe, tzinfo, i18n, activesupport, claide, xcodeproj, molinillo, cocoapods-try, netrc, cocoapods-trunk, cocoapods-stats, cocoapods-search, cocoapods-plugins, cocoapods-downloader, cocoapods-deintegrate, fuzzy_match, cocoapods-core, cocoapods after 146 seconds

$ruby -v ,

Somehow it happened there is no executable 'openssl',

输入命令

2.3 gems installed

$ rvm 2.3.3 --default

Please be aware that you just installed a ruby that requires 1 patches just to be compiled on an up to date linux system.

安装Homebrew

Ruby was built without documentation, to build it run: rvm docs generate-ri成功

 //安装一个ruby版本 安装成功后设置默认版本

如果不成功,错误一:

Error running 'requirements_osx_brew_update_system ruby-2.3.1',

showing last 15 lines of /Users/max-pc/.rvm/log/1479699089_ruby-2.3.1/update_system.log

and make sure `brew update` works before continuing.'

2.2需要升级ruby;

1 安装brew

$curl -L get.rvm.io | bash -s stable

rvm rubies

=*ruby-2.3.3[ x86_64 ]

# => - current

# =* - current && default

#* - default

pod update --- > pod update --verbose --no-repo-update

但是当升级完Brew之后,可能会出现

则安装成功 》

出现版本信息:

2、开始安装cocoapods

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

再执行 rvm:rvm install 2.2.2

这个就不要急了,你只需要等等吧,这说明cocoapods在将他的信息下载到~/.cocoapods里,cd  到该目录里,用du -sh *命令来查看文件大小

ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]

$rvm install 2.3.3 

谨记:运行pod install时总是卡在Setting up CocoaPods master repo,因为这条命令被墙了,换成pod install --verbose --no-repo-update

或者使用命令:$rvm list 输出信息为:

结果:

安装好之后使用

$gem sources -

Setting up CocoaPods master repo

1、检查当前ruby版本

这是因为淘宝的镜像已经不再维护了,目前是ruby china社区在维护,所以,你可以执行以下命令来完成换源:

ruby-e"$(curl -fsSL to locate Homebrew澳门新葡亰赌全部网址,!

//需要等一会

Error fetching :

*** CURRENT SOURCES ***

 //设置ruby2.3.1为系统默认版本

Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mach (LoadError)

from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'

from /usr/local/Library/Homebrew/extend/pathname.rb:2:in `'

from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'

from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'

from /usr/local/Library/Homebrew/global.rb:3:in `'

from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'

from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'

from /usr/local/Library/brew.rb:15:in `'

$rvm -v

$ruby-e"$(curl -fsSL )"

我安装的是2.3 的版本

终端命令:

$ curl -L get.rvm.io | bash -s stable

brew help

这里不只是检测Ruby安装的问题,还要看Ruby的版本是否大于2.2.2,不然会报错:Error installing pods: activesupport requires Ruby version >= 2.2.2。

$sudo gem install -n/usr/local/bin cocoapods

source ~/.bashrc

source ~/.bash_profile

Brew是OS X上类似apt-get以及yum的一个软件包管理器,它依托于Github,这个具体是安装还是更细我当时怎么整的也忘了,就是要用新的,卸载重新安装,我感觉比较好。

3.检测Ruby是否安装

把里面的文件全部删除(包括隐藏文件 如.github)

$rvm list known  //列出ruby可安装的版本信息

# MRI Rubies

[ruby-]1.8.6[-p420]

[ruby-]1.8.7[-head] # security released on head

[ruby-]1.9.1[-p431]

[ruby-]1.9.2[-p330]

[ruby-]1.9.3[-p551]

[ruby-]2.0.0[-p648]

[ruby-]2.1[.10]

[ruby-]2.2[.6]

[ruby-]2.3[.3]

[老葡京娱乐,澳门葡京网站平台,ruby-]2.4[.0-rc1]

ruby-head

Setup completed

本文由新葡京8455发布,转载请注明来源

关键词: