Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError - undefined method `specification' for nil:NilClass #3230

Closed
aenglund opened this issue Mar 5, 2015 · 2 comments
Closed

NoMethodError - undefined method `specification' for nil:NilClass #3230

aenglund opened this issue Mar 5, 2015 · 2 comments

Comments

@aenglund
Copy link

aenglund commented Mar 5, 2015

Command

/usr/bin/pod install

Report

  • What did you do?
    A pod install to install a Pod with specs located on a private spec repo. "localtest"
  • What did you expect to happen?
    The pod to be installed. This exact setup works fine with Cocoapods 0.35
  • What happened instead?
    NoMethodError - undefined method `specification' for nil:NilClass

Stack

   CocoaPods : 0.36.0.rc.1
        Ruby : ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
    RubyGems : 2.0.14
        Host : Mac OS X 10.10.1 (14B25)
       Xcode : 6.1.1 (6A2008a)
         Git : git version 1.9.3 (Apple Git-50)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : localtest - /Volumes/Foobar/Repositories/Podspec.git @ 0ebc0f4f7719d9f88d7fbe13bcdb7788a6589aef
               master - https://github.com/CocoaPods/Specs.git @ 41dfb21008399a28727237df1115ffac8763b0f8

Plugins

cocoapods-plugins : 0.4.1
cocoapods-trunk   : 0.1.4
cocoapods-try     : 0.4.3

Podfile

platform :ios, '7.0'

pod 'ALEKit', :head

Error

NoMethodError - undefined method `specification' for nil:NilClass
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/resolver.rb:315:in `find_cached_set'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/resolver.rb:107:in `search_for'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/resolver.rb:210:in `block in sort_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/resolver.rb:204:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/resolver.rb:204:in `sort_by'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/resolver.rb:204:in `sort_dependencies'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.2.1/lib/molinillo/resolution.rb:123:in `block (2 levels) in <class:Resolution>'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.2.1/lib/molinillo/resolution.rb:166:in `initial_state'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.2.1/lib/molinillo/resolution.rb:83:in `start_resolution'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.2.1/lib/molinillo/resolution.rb:59:in `resolve'
/Library/Ruby/Gems/2.0.0/gems/molinillo-0.2.1/lib/molinillo/resolver.rb:40:in `resolve'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/resolver.rb:55:in `resolve'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/installer/analyzer.rb:429:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/user_interface.rb:49:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/installer/analyzer.rb:427:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/installer/analyzer.rb:58:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/installer.rb:189:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/installer.rb:111:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/user_interface.rb:49:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/installer.rb:110:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/installer.rb:90:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/command/project.rb:101:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:312:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/lib/cocoapods/command.rb:46:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.0.rc.1/bin/pod:44:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
@segiddins
Copy link
Member

You need to specify the localtest source in your Podfile via its source URL, but we should probably have a better error message when trying to use :head with pods that aren't found.

@segiddins
Copy link
Member

Thanks so much for the error report @aenglund! I just pushed a fix for this to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants