trulia / hologram

A markdown based documentation system for style guides.
http://trulia.github.io/hologram
Other
2.16k stars 200 forks source link

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

Closed arozwalak closed 9 years ago

arozwalak commented 9 years ago

running hologram on my project results below error. I don't code in ruby and I can't find any solution for this issue. Maybe you know where is the problem?

Adding renderer for haml examples
Adding renderer for html examples
Adding renderer for js examples
Adding renderer for jsx examples
Adding renderer for react examples
Adding renderer for slim examples
(erb):37:in `block in get_binding': undefined method `downcase' for nil:NilClass (NoMethodError)
    from (erb):36:in `each'
    from (erb):36:in `get_binding'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/erb.rb:849:in `eval'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/erb.rb:849:in `result'
    from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:243:in `write_page'
    from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:199:in `block in write_docs'
    from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:185:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:185:in `write_docs'
    from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:147:in `build_docs'
    from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:87:in `build'
    from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/cli.rb:38:in `build'
    from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/cli.rb:30:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/bin/hologram:6:in `<top (required)>'
    from /usr/bin/hologram:23:in `load'
    from /usr/bin/hologram:23:in `<main>'
arozwalak commented 9 years ago

I found a solutions. It was connected with hologram config.yml file and index option which was pointed to wrong category. Because of that _header.html couldn't read title variable on which it tried to fire downcase method.

Problem solved.