1. 程式人生 > >.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/rubygems/...:in `require':

.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/rubygems/...:in `require':

在生成pod模板庫是發現一個錯誤導致模板庫生成錯誤:
.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require’: cannot load such file – colored2 (LoadError)

輸入上面提示的colored2的兩條gem命令即可解決問題
$ sudo gem install colored2

中間會提示輸入密碼
$ sudo gem update –system

完成後繼續執行自己的命令
$ pod lib create XXXlib

RubyGems system software updated
likexue的Mac-Pro:SelectArea likexue$ pod lib create KXSelectArea
Cloning https://github.com/CocoaPods/pod-template.git

into KXSelectArea.
Configuring KXSelectArea template.
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
! Before you can create a new library we need to setup your git credentials.
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.

What is your name?

likexue

! Setting your name in git to likexue
git config user.name “likexue”

To get you started we need to ask a few questions, this should only take a minute.

If this is your first time we recommend running through with the guide:
- http://guides.cocoapods.org/making/using-pod-lib-create.html


( hold cmd and double click links to open in a browser. )

What language do you want to use?? [ Swift / ObjC ]

Objc

Would you like to include a demo application with your library? [ Yes / No ]

yes

Which testing frameworks will you use? [ Specta / Kiwi / None ]

None

Would you like to do view based testing? [ Yes / No ]

no

What is your class prefix?

KX
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.

Running pod install on your new library.

Analyzing dependencies
Fetching podspec for KXSelectArea from ../
Downloading dependencies
Installing KXSelectArea (0.1.0)
Generating Pods project
Integrating client project

[!] Please close any current Xcode sessions and use KXSelectArea.xcworkspace for this project from now on.
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

Ace! you’re ready to go!
We will start you off by opening your project in Xcode
open ‘KXSelectArea/Example/KXSelectArea.xcworkspace’
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.
likexue的Mac-Pro:SelectArea likexue$