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 `end_with?' for nil:NilClass #3975

Closed
hamaguchi opened this issue Aug 6, 2015 · 4 comments
Closed

undefined method `end_with?' for nil:NilClass #3975

hamaguchi opened this issue Aug 6, 2015 · 4 comments
Labels
s4:awaiting validation A Pull Request that is waiting for validation by a CocoaPods Core Team member

Comments

@hamaguchi
Copy link

Command

/usr/bin/pod update

Report

  • What did you do?
  • What did you expect to happen?
  • What happened instead?

Stack

   CocoaPods : 0.38.2
        Ruby : ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
    RubyGems : 2.4.8
        Host : Mac OS X 10.10.4 (14E46)
       Xcode : 6.4 (6E35b)
         Git : git version 2.3.2 (Apple Git-55)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master -  @ fatal: Not a git repository (or any of the parent directories): .git
               master-1 - https://github.com/CocoaPods/Specs.git @ d639038141fa90ce64c3543da5f8cddfa5ce75c5

Plugins

cocoapods-plugins : 0.4.2
cocoapods-stats   : 0.5.3
cocoapods-trunk   : 0.6.1
cocoapods-try     : 0.4.5

Podfile

# Uncomment this line to define a global platform for your project
# platform :ios, '6.0'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

target 'EuroFootballNews' do
  pod 'GoogleAnalytics', '~> 3.0'
  pod 'Alamofire','~> 1.2.0'
  pod 'SwiftyJSON', '~> 2.2.0'
  pod 'SVProgressHUD'
  pod 'Google-Mobile-Ads-SDK', '~> 7.0'
  pod 'RealmSwift'
  pod 'SDWebImage'
  pod 'AQSLINEActivity'
end

Error

NoMethodError - undefined method `end_with?' for nil:NilClass
/Library/Ruby/Gems/2.0.0/gems/cocoapods-stats-0.5.3/lib/cocoapods_plugin.rb:4:in `validates?'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-stats-0.5.3/lib/cocoapods_plugin.rb:25:in `block in <module:CocoaPodsStats>'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/hooks_manager.rb:115:in `call'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/hooks_manager.rb:115:in `block (3 levels) in run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:140:in `message'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/hooks_manager.rb:111:in `block (2 levels) in run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/hooks_manager.rb:109:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/hooks_manager.rb:109:in `block in run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:140:in `message'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/hooks_manager.rb:108:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:453:in `run_plugins_post_install_hooks'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:444:in `perform_post_install_actions'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:112:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:156:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command.rb:48:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/bin/pod:44:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
@edwardmp
Copy link

edwardmp commented Aug 9, 2015

I had the same issue. I noticed at the beginning it says master - @ fatal: Not a git repository (or any of the parent directories): .git

I went to ~/.cocoapods/repos and I saw two directories, master and master-1 of which master was not a git repo. I deleted master and renamed master-1 to master and everything worked fine after that.

@hamaguchi
Copy link
Author

Comment Thanks! > edwardmp

Referring to the comments, if you see the .cocoapods, there was a master / master-1. For now, the .cocoapods, was renamed to old.cocoapods, After pod update, no longer get an error.

solved. Thanks!

@segiddins
Copy link
Member

Should be fixed by CocoaPods/cocoapods-stats#24.

@segiddins segiddins added the s4:awaiting validation A Pull Request that is waiting for validation by a CocoaPods Core Team member label Aug 29, 2015
@fisnik
Copy link

fisnik commented Oct 2, 2015

+1 @edwardmp - it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s4:awaiting validation A Pull Request that is waiting for validation by a CocoaPods Core Team member
Projects
None yet
Development

No branches or pull requests

4 participants