Cocoapods: pod lib create error

Created on 14 Apr 2017  Â·  18Comments  Â·  Source: CocoaPods/CocoaPods

What did you do?

Run pod lib create Share

What did you expect to happen?

create a Share lib。

What happened instead?

faild to creat pod lib Share and output:
Cloning https://github.com/CocoaPods/pod-template.git into Share.
Configuring Share template.
/usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- colored (LoadError) from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from /Users/tang/github/Share/setup/TemplateConfigurator.rb:2:in <top (required)>' from ./configure:5:inrequire_relative'
from ./configure:5:in block in <main>' from ./configure:4:ineach'
from ./configure:4:in `

'

CocoaPods Environment

Stack

   CocoaPods : 1.2.1
        Ruby : ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
    RubyGems : 2.6.11
        Host : Mac OS X 10.12.4 (16E195)
       Xcode : 8.3 (8E162)
         Git : git version 2.11.0 (Apple Git-81)
Ruby lib dir : /usr/local/Cellar/ruby/2.4.1_1/lib
Repositories : 

Installation Source

Executable Path: /usr/local/bin/pod

Plugins

cocoapods-deintegrate : 1.0.1
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.2.0
cocoapods-try         : 1.1.0
awaiting input

Most helpful comment

As of Cocoapods version 1.5.3, I got SecKeychainSearchCopyNext error failing the pod lib create command. I solved it by updating with sudo gem update xcodeproj. Then it works as expected.

All 18 comments

I got the same error when I didn't have the colored gem installed on my machine. Can you run the command gem install colored and try again?

Oh interesting, we don't ship with coloured in CP anymore, uses colored2 - can you make an issue or pr to cocoa pods/pod-template for this?

Thanks for the info @orta - I have submitted the PR https://github.com/CocoaPods/pod-template/pull/207.

I'm experiencing a similar crash on pod lib create [name].

/myfolder/myproject/setup/MessageBank.rb:45:in `welcome_message': undefined method `underline' for #<String:0x007fe34b8675a0> (NoMethodError)
    from /myfolder/myproject/setup/TemplateConfigurator.rb:71:in `run'
    from ./configure:9:in `<main>'

Same crash on pod lib create [name].
/Users/Desktop/someting/setup/MessageBank.rb:45:in welcome_message': undefined methodunderline' for # (NoMethodError)
Did you mean? underlined
underlined!
from /Users/Desktop/someting/setup/TemplateConfigurator.rb:71:in run' from ./configure:9:in

'

faild to creat pod lib Share and output:
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:
/Users/JQC/Desktop/业务组件/FMMine/setup/MessageBank.rb:45:in welcome_message': undefined methodunderline' for # (NoMethodError)
Did you mean? underlined
underlined!
from /Users/JQC/Desktop/业务组件/FMMine/setup/TemplateConfigurator.rb:71:in run' from ./configure:9: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

CocoaPods Environment 1.2.1
cocoapods (1.2.1)
cocoapods-core (1.2.1)
cocoapods-deintegrate (1.0.1)
cocoapods-downloader (1.1.3)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.0)
cocoapods-stats (1.0.0)
cocoapods-trunk (1.2.0, 1.1.2)
cocoapods-try (1.1.0)

@orta Still crash

undefined method underline' for #<String:0x007ff20d07d6c0> (NoMethodError)
Did you mean?  underlined
               underlined!

@sush4 Have you fixed it?

@annjose Thank you. I fixed the "colored (LoadError)" . But I encounted another problem, when I run "pod lib create Share". output:

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

2017-04-16 12:00:23.595 defaults[885:16979]
The domain/default pair of (org.cocoapods.pod-template, HasRunbefore) does not exist
If this is your first time we recommend running through with the guide:
/Users/tang/github/Share/setup/MessageBank.rb:45:in welcome_message': undefined methodunderline' for # (NoMethodError)
Did you mean? underlined
underlined!
from /Users/tang/github/Share/setup/TemplateConfigurator.rb:71:in run' from ./configure:9: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.

@tangzhentao the problem has been identified and a fix has been produced. Just waiting for code review and the fix should be merged in the master branch soon.

@MyroMac fixed! Thank you!

I slove it. I run the command ''sudo gem install fastlane'' to update my another plug-in fanstlane. I hope it can help you.

@appbanana Thank you for telling me your solution. Now "pod lib create " works.

Running sudo gem install fastlane worked for me too. For some reason I keep getting a warning.

Would you like to do view based testing? [ Yes / No ]
 > no
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.

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem :+1:

As of Cocoapods version 1.5.3, I got SecKeychainSearchCopyNext error failing the pod lib create command. I solved it by updating with sudo gem update xcodeproj. Then it works as expected.

sudo gem update xcodeproj

I'm getting the SecKeychainSearchCopyNext error with the latest Codoapods (1.6.1) and the latest xcodeproj. I haven't seen any issues yet but it concerns me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

intelliot picture intelliot  Â·  3Comments

dawnnnnn picture dawnnnnn  Â·  3Comments

Mingmingmew picture Mingmingmew  Â·  3Comments

sonu5 picture sonu5  Â·  3Comments

gerchicov-bp picture gerchicov-bp  Â·  3Comments