在pod lib create出现上面的错误时的解决设计方法targetclouddeMacBook-Pro:FM targetcloud$ pod lib create TGSegmentCloning `https://github.com/CocoaPods/pod-template.git` into `TGSegment`.Configuring TGSegment template./Users/targetcloud/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require': cannot load such file -- colored2 (LoadError)from /Users/targetcloud/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require'from /Users/targetcloud/Desktop/FM/TGSegment/setup/TemplateConfigurator.rb:2:in `'from ./configure:5:in `require_relative'from ./configure:5:in `block in'from ./configure:4:in `each'from ./configure:4:in `'
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`.
输入上面提示的colored2的两条gem命令即可解决问题
sudo gem install colored2
sudo gem update --system
-----------改下为图文过程(供参考)--------------
错误
sudo gem install colored2
sudo gem update --system
成功