升级系统导致cocoapods无法正常使用。
运行搜索开源库
liangchengnandeMacBook-Pro:YDChartsDemo ken$ pod search ios-charts
-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory
这是什么鬼,一脸懵逼啊。
百度啊。谷歌啊,都说是要更新pods ,说干就干
liangchengnandeMacBook-Pro:YDChartsDemo ken$ sudo gem install -n /usr/local/bin/ cocoapods
Password:
Fetching: concurrent-ruby-1.0.5.gem (100%)
Successfully installed concurrent-ruby-1.0.5
Fetching: i18n-0.9.0.gem (100%)
Successfully installed i18n-0.9.0
Fetching: thread_safe-0.3.6.gem (100%)
Successfully installed thread_safe-0.3.6
Fetching: tzinfo-1.2.4.gem (100%)
Successfully installed tzinfo-1.2.4
Fetching: activesupport-4.2.10.gem (100%)
Successfully installed activesupport-4.2.10
Fetching: nap-1.1.0.gem (100%)
Successfully installed nap-1.1.0
Fetching: fuzzy_match-2.0.4.gem (100%)
Successfully installed fuzzy_match-2.0.4
Fetching: cocoapods-core-1.3.1.gem (100%)
Successfully installed cocoapods-core-1.3.1
Fetching: claide-1.0.2.gem (100%)
Successfully installed claide-1.0.2
Fetching: cocoapods-deintegrate-1.0.1.gem (100%)
Successfully installed cocoapods-deintegrate-1.0.1
Fetching: cocoapods-downloader-1.1.3.gem (100%)
Successfully installed cocoapods-downloader-1.1.3
Fetching: cocoapods-plugins-1.0.0.gem (100%)
Successfully installed cocoapods-plugins-1.0.0
Fetching: cocoapods-search-1.0.0.gem (100%)
Successfully installed cocoapods-search-1.0.0
Fetching: cocoapods-stats-1.0.0.gem (100%)
Successfully installed cocoapods-stats-1.0.0
Fetching: netrc-0.11.0.gem (100%)
Successfully installed netrc-0.11.0
Fetching: cocoapods-trunk-1.3.0.gem (100%)
Successfully installed cocoapods-trunk-1.3.0
Fetching: cocoapods-try-1.1.0.gem (100%)
Successfully installed cocoapods-try-1.1.0
Fetching: molinillo-0.5.7.gem (100%)
Successfully installed molinillo-0.5.7
Fetching: CFPropertyList-2.3.5.gem (100%)
Successfully installed CFPropertyList-2.3.5
Fetching: colored2-3.1.2.gem (100%)
Successfully installed colored2-3.1.2
Fetching: nanaimo-0.2.3.gem (100%)
Successfully installed nanaimo-0.2.3
Fetching: xcodeproj-1.5.3.gem (100%)
ERROR:While executing gem ... (TypeError)
no implicit conversion of nil into String
一路小激动,这速度,杠杠的,眼看就要到黎明,最后这是什么鬼。继续百度,谷歌了一番,要更新 gem 那就别闲着了,时间就是就是金钱啊。。。
liangchengnandeMacBook-Pro:YDChartsDemo ken$ sudo gem update --system
Password:
Updating rubygems-update
Fetching: rubygems-update-2.6.14.gem (100%)
Successfully installed rubygems-update-2.6.14
Parsing documentation for rubygems-update-2.6.14
Installing ri documentation for rubygems-update-2.6.14
Installing darkfish documentation for rubygems-update-2.6.14
Done installing documentation for rubygems-update after 36 seconds
Parsing documentation for rubygems-update-2.6.14
Done installing documentation for rubygems-update after 0 seconds
Installing RubyGems 2.6.14
RubyGems 2.6.14 installed
Parsing documentation for rubygems-2.6.14
Installing ri documentation for rubygems-2.6.14
中间省略几万字。。。。
RubyGems installed the following executables:
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/gem
Ruby Interactive (ri) documentation was installed. ri is kind of like man
pages for ruby libraries. You may access it like this:
ri Classname
ri Classname.class_method
ri Classname#instance_method
If you do not wish to install this documentation in the future, use the
--no-document flag, or set it as the default in your ~/.gemrc file. See
'gem help env' for details.
RubyGems system software updated
完成更新,继续之前操作,更新pods
liangchengnandeMacBook-Pro:YDChartsDemo ken$ sudo gem install -n /usr/local/bin/ cocoapods --pre
一路顺利
liangchengnandeMacBook-Pro:YDChartsDemo ken$ pod setup
省略几万字
看到熟悉的Setup completed 完成
看下可不可执行
iangchengnandeMacBook-Pro:YDChartsDemo ken$ pod search ios-charts
。。。。。
完美