當我在終端輸入git
localhost:~ zmit$ cd /Users/zmit/Desktop/cocoapods本地私有庫的使用/本地私有庫優化方案2/localLib github
localhost:localLib zmit$ pod lib create XMGFMBaseruby
顯示出以下錯誤:bash
Cloning `https://github.com/CocoaPods/pod-template.git` into `XMGFMBase`.app
Configuring XMGFMBase template.ide
/Users/zmit/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- colored2 (LoadError)優化
from /Users/zmit/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'ui
from /Users/zmit/Desktop/cocoapods本地私有庫的使用/本地私有庫優化方案2/localLib/XMGFMBase/setup/TemplateConfigurator.rb:2:in `<top (required)>'spa
from ./configure:5:in `require_relative'server
from ./configure:5:in `block in <main>'
from ./configure:4:in `each'
from ./configure:4:in `<main>'
To learn more about the template see `https://github.com/CocoaPods/pod-template.git`.
To learn more about creating a new pod, see `http://guides.cocoapods.org/making/making-a-cocoapod`.
解決方法:
第一步:
localhost:localLib zmit$ sudo gem install colored2
Password:
第二步:
localhost:localLib zmit$ sudo gem update --system
又報錯了
錯誤入下:
Updating rubygems-update
ERROR: While executing gem ... (OpenSSL::SSL::SSLError)
hostname "gems.ruby-china.org" does not match the server certificate
localhost:localLib zmit$ gem install bundle
Fetching: bundler-1.16.0.gem (100%)
Successfully installed bundler-1.16.0
Fetching: bundle-0.0.1.gem (100%)
Successfully installed bundle-0.0.1
Parsing documentation for bundler-1.16.0
Installing ri documentation for bundler-1.16.0
Parsing documentation for bundle-0.0.1
Installing ri documentation for bundle-0.0.1
Done installing documentation for bundler, bundle after 15 seconds
2 gems installed
而後再接着輸入:
localhost:localLib zmit$ rvm -v
localhost:localLib zmit$ rvm get head
終於出現了這個:
Downloading https://get.rvm.io
No GPG software exists to validate rvm-installer, skipping.
Downloading https://github.com/rvm/rvm/archive/master.tar.gz
Upgrading the RVM installation in /Users/zmit/.rvm/
RVM PATH line found in /Users/zmit/.mkshrc /Users/zmit/.profile /Users/zmit/.bashrc /Users/zmit/.zshrc.
RVM sourcing line found in /Users/zmit/.profile /Users/zmit/.bash_profile /Users/zmit/.zlogin.
Upgrade of RVM in /Users/zmit/.rvm/ is complete.
Upgrade Notes:
* RVM 1.30 simplifies behavior of 'rvm wrapper' subcommand
RVM reloaded!
這樣就好了