rubygems/core_ext/kernel_require.rb:120:in `require': cannot load such file -- colored2 (LoadError)

pod lib create出现上面的错误时的解决设计方法

targetclouddeMacBook-Pro:FM targetcloud$ pod lib create TGSegment
Cloning `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
rubygems/core_ext/kernel_require.rb:120:in `require': cannot load such file -- colored2 (LoadError)_第1张图片

sudo gem update --system
rubygems/core_ext/kernel_require.rb:120:in `require': cannot load such file -- colored2 (LoadError)_第2张图片

成功

rubygems/core_ext/kernel_require.rb:120:in `require': cannot load such file -- colored2 (LoadError)_第3张图片


你可能感兴趣的:(iOS)