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 `downcase' for nil:NilClass (NoMethodError) #2

Closed
hazybluedot opened this issue Dec 12, 2013 · 2 comments
Closed

undefined method `downcase' for nil:NilClass (NoMethodError) #2

hazybluedot opened this issue Dec 12, 2013 · 2 comments
Labels

Comments

@hazybluedot
Copy link

when querying a particular element that does not exist

$ find content/ -type f -name '*.md' | xargs fore list tags                                                                                                              
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/forematter-0.1.0/lib/forematter/commands/list.rb:13:in `each': undefined method `downcase' for nil:NilClass (NoMethodError)
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/forematter-0.1.0/lib/forematter/commands/list.rb:13:in `sort_by'
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/forematter-0.1.0/lib/forematter/commands/list.rb:13:in `run'
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/forematter-0.1.0/lib/forematter/command_runner.rb:6:in `call'
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/cri-2.4.1/lib/cri/command_dsl.rb:185:in `block in runner'
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/cri-2.4.1/lib/cri/command.rb:298:in `call'
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/cri-2.4.1/lib/cri/command.rb:298:in `run_this'
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/cri-2.4.1/lib/cri/command.rb:251:in `run'
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/cri-2.4.1/lib/cri/command.rb:264:in `run'
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/forematter-0.1.0/lib/forematter.rb:36:in `run'
        from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/forematter-0.1.0/bin/fore:10:in `<top (required)>'
@bobthecow
Copy link
Owner

This doesn't fail for me:

$ find content/ -type f -name "*.md" | xargs fore list undefined

Do you mind digging a bit to see what it is about those items that's failing? Maybe you have a tags element that's null or something?

@hazybluedot
Copy link
Author

Indeed, it occurred on a file in which I had defined a 'tags' element with no value:

---
title: Some Title
published: false
kind: article
created_at: '2013-07-30 10:42:15 -0400'
tags:
---

bobthecow added a commit that referenced this issue Dec 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants