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 `start_with?' for true:TrueClass #2923

Closed
madhavisolanki opened this issue Dec 10, 2014 · 16 comments
Closed
Labels
s2:confirmed Issues that have been confirmed by a CocoaPods contributor t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Milestone

Comments

@madhavisolanki
Copy link

Report

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

Stack

   CocoaPods : 0.35.0
        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 :
               SafetyChangerLogin - git
               SafetyChangerVersionCheck -git

Plugins

cocoapods-plugins : 0.3.2
cocoapods-trunk   : 0.4.1
cocoapods-try     : 0.4.2

Error

NoMethodError - undefined method `start_with?' for true:TrueClass
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter/analyzer.rb:86:in `block (2 levels) in validate_file_patterns'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter/analyzer.rb:85:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter/analyzer.rb:85:in `block in validate_file_patterns'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter/analyzer.rb:77:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter/analyzer.rb:77:in `validate_file_patterns'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter/analyzer.rb:20:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter.rb:125:in `block (2 levels) in perform_all_specs_analysis'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter.rb:120:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter.rb:120:in `block in perform_all_specs_analysis'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter.rb:119:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter.rb:119:in `perform_all_specs_analysis'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter.rb:51:in `lint'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/source/health_reporter.rb:88:in `lint_spec'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/source/health_reporter.rb:53:in `block (2 levels) in analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/source/health_reporter.rb:50:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/source/health_reporter.rb:50:in `block in analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/source/health_reporter.rb:49:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/source/health_reporter.rb:49:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo.rb:130:in `block in run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo.rb:122:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo.rb:122:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:271:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:45:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
@segiddins
Copy link
Member

@maddy9859 can you share the podspec you're trying to push?

@segiddins segiddins added the s1:awaiting input Waiting for input from the original author label Dec 10, 2014
@madhavisolanki
Copy link
Author

@segiddins hey I was able to create the pod, I was adding wrong source. Thanks

@timonroe
Copy link

@maddy9859 hi. I'm getting the same error. You said you were 'adding the wrong source'. Are you talking about the 'source' or 'source_files' in the podspec or something else?

@segiddins
Copy link
Member

@timonroe can you please share your podspec?

@timonroe
Copy link

@segiddins I'm trying to create a private pod, here's the podspec:

Pod::Spec.new do |s|
  s.name         = "MCAppLog"
  s.version      = "1.0.0"
  s.summary      = "Monroe Consulting Group common component - MCAppLog."
  s.description  = <<-DESC
                   MCAppLog: Monroe Consulting Group common component.
                   Common components used for building iOS apps.
                   DESC
  s.homepage     = "http://monroegolf.com"
  s.license      = 'MIT'
  s.author       = { "Tim Monroe" => "timonroecg@gmail.com" }
  s.source       = { :git => "/users/timonroe/.cocoapods/repos/mcapplog/.git", :tag => "1.0.0" }

  s.platform     = :ios, '8.1'
  s.ios.deployment_target = '8.1'
  s.requires_arc = true

  s.frameworks   = 'Foundation'

  s.source_files = 'MCAppLog/MCAppLog.h', 'MCAppLog/MCAppLog.m'
end

@timonroe
Copy link

@segiddins Here's what I ran to add my private repo to the cocoapods installation:
pod repo add MCAppLog /users/timonroe/desktop/development/mccommoncomponents/mcapplog/.git
cd ~/.cocoapods/repos/MCAppLog
pod repo lint

Running lint gave me the error:

Stack

   CocoaPods : 0.35.0
        Ruby : ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
    RubyGems : 2.4.5
        Host : Mac OS X 10.10.1 (14B25)
       Xcode : 6.1.1 (6A2008a)
         Git : git version 1.8.4
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ c1f98324f18d0482ac9f3d72b2adaa24e283b4c3
               MCAppLog - /users/timonroe/desktop/development/mccommoncomponents/mcapplog/.git @ 0f653d1c2f31cfc177d9f89f02da6229e1afa639

Plugins

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

Error

NoMethodError - undefined method `start_with?' for true:TrueClass
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter/analyzer.rb:86:in `block (2 levels) in validate_file_patterns'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter/analyzer.rb:85:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter/analyzer.rb:85:in `block in validate_file_patterns'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter/analyzer.rb:77:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter/analyzer.rb:77:in `validate_file_patterns'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter/analyzer.rb:20:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter.rb:125:in `block (2 levels) in perform_all_specs_analysis'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter.rb:120:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter.rb:120:in `block in perform_all_specs_analysis'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter.rb:119:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter.rb:119:in `perform_all_specs_analysis'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/specification/linter.rb:51:in `lint'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/source/health_reporter.rb:88:in `lint_spec'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/source/health_reporter.rb:53:in `block (2 levels) in analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/source/health_reporter.rb:50:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/source/health_reporter.rb:50:in `block in analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/source/health_reporter.rb:49:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/source/health_reporter.rb:49:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo.rb:130:in `block in run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo.rb:122:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo.rb:122:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:271:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:45:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'

@segiddins segiddins reopened this Jan 13, 2015
@velyan
Copy link

velyan commented Jan 13, 2015

@timonroe Hi, you might get this error if your .podspec file is not located in the root of your repo.

@timonroe
Copy link

@segiddins I just installed 36 Beta 1 and the problem still exists so assuming your changes aren't in there. Do you know which version I can rollback to and get around this?

@segiddins
Copy link
Member

@timonroe I'll need to investigate to be able to answer that, sorry.

@timonroe
Copy link

@velyan Hi, my podspec file is unfortunately located in the root.

@timonroe
Copy link

@segiddins I installed version 0.34.0 and no longer get this error.

@segiddins
Copy link
Member

Thanks for the info @timonroe, I'll need to dig in to find the issue.

@segiddins segiddins added s2:confirmed Issues that have been confirmed by a CocoaPods contributor t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome! and removed s1:awaiting input Waiting for input from the original author labels Jan 14, 2015
@timonroe
Copy link

@segiddins Hi. I'm now trying to use my private pod in a project and get the following error when running 'pod install'

Resolving dependencies of Podfile
Resolving dependencies for target `Pods' (iOS 8.1)

  • MCAppLog (= 1.0.0)

[!] An unexpected version directory Base.lproj was encountered for the /Users/timonroe/.cocoapods/repos/MCAppLog/MCAppLog Pod in the MCAppLog repository.

Here's what my podfile looks like:

source 'https://github.com/CocoaPods/Specs.git'
source '/users/timonroe/desktop/development/mccommoncomponents/mcapplog/.git'
platform :ios, '8.1'
pod 'MCAppLog', '1.0.0'

Any help with this is greatly appreciated.

@segiddins
Copy link
Member

That's a different issue.

-Samuel E. Giddins

On Jan 13, 2015, at 5:37 PM, Tim Monroe notifications@github.com wrote:

@segiddins Hi. I'm now trying to use my private pod in a project and get the following error when running 'pod install'

Resolving dependencies of Podfile
Resolving dependencies for target `Pods' (iOS 8.1)

MCAppLog (= 1.0.0) [!] An unexpected version directory Base.lproj was encountered for the /Users/timonroe/.cocoapods/repos/MCAppLog/MCAppLog Pod in the MCAppLog repository.
Here's what my podfile looks like:

source 'https://github.com/CocoaPods/Specs.git'
source '/users/timonroe/desktop/development/mccommoncomponents/mcapplog/.git'
platform :ios, '8.1'
pod 'MCAppLog', '1.0.0'

Any help with this is greatly appreciated.


Reply to this email directly or view it on GitHub.

@timonroe
Copy link

@segiddins Following up just in case someone else runs into this...
The problem was caused by the structure of the project's folders. The default structure of an XCode project will not work. Pod install chokes on the Base.lproj folder if it's at the same level in the folder structure as the files used in the pod. To fix it, I rearranged the folders/files so they looked like:
snapshot

@kylef kylef added this to the 0.36.0 milestone Jan 16, 2015
@segiddins
Copy link
Member

The error here is adding your whole project to the specs repo, only the spec should be added.

segiddins added a commit to CocoaPods/Core that referenced this issue Feb 19, 2015
Ashton-W pushed a commit to Ashton-W/Core that referenced this issue Nov 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s2:confirmed Issues that have been confirmed by a CocoaPods contributor t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Projects
None yet
Development

No branches or pull requests

6 participants