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

undefined method `exists?' for nil:NilClass when pod install #385

Closed
qichunren opened this issue Jul 11, 2012 · 8 comments
Closed

undefined method `exists?' for nil:NilClass when pod install #385

qichunren opened this issue Jul 11, 2012 · 8 comments

Comments

@qichunren
Copy link

caojinhua:ruby-china-ios caojinhua$ pod install
Updating spec repo `master'

  • Pre-downloading: 'QBKOverlayMenuView'

Report

  • When I pod install

Stack

   CocoaPods : 0.8.0
        Ruby : ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.2.0]
    RubyGems : 1.8.24
        Host : Mac OS X 10.7.2 (11C74)
       Xcode : 4.2.1 (4D502)
Ruby lib dir : /Users/caojinhua/.rvm/rubies/ruby-1.9.2-p290/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 39bed179c4f7f1a66c1ee9703d05c62e54669704

Podfile

platform :ios
pod 'AFNetworking'
pod 'QBKOverlayMenuView', :git => "https://github.com/sendoa/QBKOverlayMenuView.git"

Error

undefined method `exists?' for nil:NilClass
/Users/caojinhua/.rvm/gems/ruby-1.9.2-p290/gems/cocoapods-0.8.0/lib/cocoapods/dependency.rb:140:in `specification_from_sandbox'
/Users/caojinhua/.rvm/gems/ruby-1.9.2-p290/gems/cocoapods-0.8.0/lib/cocoapods/resolver.rb:44:in `find_cached_set'
/Users/caojinhua/.rvm/gems/ruby-1.9.2-p290/gems/cocoapods-0.8.0/lib/cocoapods/resolver.rb:60:in `block in find_dependency_specs'
/Users/caojinhua/.rvm/gems/ruby-1.9.2-p290/gems/cocoapods-0.8.0/lib/cocoapods/resolver.rb:58:in `each'
/Users/caojinhua/.rvm/gems/ruby-1.9.2-p290/gems/cocoapods-0.8.0/lib/cocoapods/resolver.rb:58:in `find_dependency_specs'
/Users/caojinhua/.rvm/gems/ruby-1.9.2-p290/gems/cocoapods-0.8.0/lib/cocoapods/resolver.rb:25:in `block in resolve'
/Users/caojinhua/.rvm/gems/ruby-1.9.2-p290/gems/cocoapods-0.8.0/lib/cocoapods/resolver.rb:22:in `each'
/Users/caojinhua/.rvm/gems/ruby-1.9.2-p290/gems/cocoapods-0.8.0/lib/cocoapods/resolver.rb:22:in `resolve'
/Users/caojinhua/.rvm/gems/ruby-1.9.2-p290/gems/cocoapods-0.8.0/lib/cocoapods/installer.rb:172:in `specs_by_target'
/Users/caojinhua/.rvm/gems/ruby-1.9.2-p290/gems/cocoapods-0.8.0/lib/cocoapods/installer.rb:81:in `install!'
/Users/caojinhua/.rvm/gems/ruby-1.9.2-p290/gems/cocoapods-0.8.0/lib/cocoapods/command/install.rb:53:in `run'
/Users/caojinhua/.rvm/gems/ruby-1.9.2-p290/gems/cocoapods-0.8.0/lib/cocoapods/command.rb:71:in `run'
/Users/caojinhua/.rvm/gems/ruby-1.9.2-p290/gems/cocoapods-0.8.0/bin/pod:12:in `<top (required)>'
/Users/caojinhua/.rvm/gems/ruby-1.9.2-p290/bin/pod:23:in `load'
/Users/caojinhua/.rvm/gems/ruby-1.9.2-p290/bin/pod:23:in `<main>'
@siuying
Copy link
Contributor

siuying commented Jul 11, 2012

Why would you do

pod 'QBKOverlayMenuView', :git => "https://github.com/sendoa/QBKOverlayMenuView.git"

instead of simply

pod 'QBKOverlayMenuView'

@qichunren
Copy link
Author

@siuying Becuase I want to use latest edge code.

@siuying
Copy link
Contributor

siuying commented Jul 11, 2012

No, I believe pods do not work that way. :git is used for repo contains a podspec in the root folder in their repo.

You must specify your own podspec, or adhoc include one similar to following:

platform :ios
pod 'AFNetworking'
pod do |s|
  s.name             =  "QBKOverlayMenuView"
  s.version          =  "0.0.1"
  s.summary          =  "UIView object that tries to mimic the behavior of the floating control used by Sparrow."
  s.description      =  "It's basically an UIView object that tries to mimic the behavior of the floating control used by http://sparrowmailapp.com/iphone.php. The control appears at the bottom right corner of the screen and it unfolds a menu whenever it's touched."
  s.homepage         =  "https://github.com/sendoa/QBKOverlayMenuView"
  s.license          =  'Permissive free software licence'
  s.author           =  { "Sendoa Portuondo" => "sendoa@gmail.com" }
  s.source           =  { :git => "https://github.com/sendoa/QBKOverlayMenuView.git", :commit => "4bc12661e781c5e1a5a568f72e2cf439ddb3a7ad" }
  s.platform         =  :ios, '5.0'
  s.source_files     =  'Source'
  s.resources        =  "Source/img/*.png"
  s.preserve_paths   =  "LEEME.md"
  s.framework        =  'CoreGraphics'
  s.requires_arc     =  true
end

@fabiopelosin
Copy link
Member

The error that @qichunren encountered appears if cocoapods can't find the podspec.

See #338

@fabiopelosin
Copy link
Member

Btw, @siuying comment is the best way to use the latest edge, for now.

@qichunren
Copy link
Author

@irrationalfab Could you think about the convenient way to use the latest edge? Just like ruby Bundler.

@siuying
Copy link
Contributor

siuying commented Jul 12, 2012

@irrationalfab if we could override/extend existing versioned pod then it would be great.

@fabiopelosin
Copy link
Member

See my current proposal in #392.

@irrationalfab Could you think about the convenient way to use the latest edge? Just like ruby Bundler.

CocoaPods already works like Bundler the difference is that the majority of the projects don't have the podspec in their repo.

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

3 participants