Closed kevinkashou closed 7 years ago
I get this when I reference a variable in my header or footer template that is nil. Are you on hologram 1.4? And can you share the tpl that's causing the error?
I am using the latest hologram and the template file and header are the same when I used hologram init.
Sent from my iPhone
On Apr 3, 2015, at 1:44 PM, JD Cantrell notifications@github.com wrote:
I get this when I reference a variable in my header or footer template that is nil. Are you on hologram 1.4? And can you share the tpl that's causing the error?
— Reply to this email directly or view it on GitHub https://github.com/trulia/hologram/issues/218#issuecomment-89413459.
Ah thanks! I'll look at it this evening.
That would be great thanks :)
Any update? It works on perfectly fine on one machine but not the machine that I need it to work on.
I had similar error after I updated to latest hologram 1.4.0
version.
» bundle exec hologram
Custom markdown renderer Cortanamarkdownrenderer loaded.
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):32:in `block in get_binding': undefined method `split' for nil:NilClass (NoMethodError)
from (erb):31:in `each'
from (erb):31:in `get_binding'
from /Users/d2s/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/erb.rb:863:in `eval'
from /Users/d2s/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/erb.rb:863:in `result'
from /Users/d2s/<<project_path_hidden>>/vendor/ruby/2.2.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:243:in `write_page'
from /Users/d2s/<<project_path_hidden>>/vendor/ruby/2.2.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:199:in `block in write_docs'
from /Users/d2s/<<project_path_hidden>>/vendor/ruby/2.2.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:185:in `each'
from /Users/d2s/<<project_path_hidden>>/vendor/ruby/2.2.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:185:in `write_docs'
from /Users/d2s/<<project_path_hidden>>/vendor/ruby/2.2.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:147:in `build_docs'
from /Users/d2s/<<project_path_hidden>>/vendor/ruby/2.2.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:87:in `build'
from /Users/d2s/<<project_path_hidden>>/vendor/ruby/2.2.0/gems/hologram-1.4.0/lib/hologram/cli.rb:38:in `build'
from /Users/d2s/<<project_path_hidden>>/vendor/ruby/2.2.0/gems/hologram-1.4.0/lib/hologram/cli.rb:30:in `run'
from /Users/d2s/<<project_path_hidden>>/vendor/ruby/2.2.0/gems/hologram-1.4.0/bin/hologram:6:in `<top (required)>'
from /Users/d2s/<<project_path_hidden>>/vendor/ruby/2.2.0/bin/hologram:23:in `load'
from /Users/d2s/<<project_path_hidden>>/vendor/ruby/2.2.0/bin/hologram:23:in `<main>'
Didn't have time to debug cause of the problem, so decided to just switch the old version back to the Gemfile
.
gem 'hologram', '~>1.3.0'
Would be nice to have this fixed.
That did the trick! Thank you so much!
Haha, let's leave this open, I'll get this fixed in 1.4
Reproduced. Same for me and also reported at jchild3rs/grunt-hologram#10.
+1
For a client site, I narrowed it down to the index:
line in the config file.
Previously, I had index: README
as I wanted it to read the README.md
file in my sources
directory. With previous versions of Hologram, that worked perfectly. 1.4.0 must have changed something.
I renamed README.md
to index.md
(as that is the fallback file name mentioned in the example config file), and commented out the index:
line. Now builds fine on 1.4.0.
I can confirm @GaryJones solution, commenting out the index: README
line from the config worked for me too. Before I would get the same error.
Commenting out the index-line also worked for me :+1:
Not sure why this ticket has been closed.
1.4.0
is a minor release. If index: README
worked in 1.3.*
, this ticket should be treated as bug and a fix should follow in 1.4.*
, because breaking change should have been released in 2.*
not 1.4.0
.
I am getting this error when trying to render out hologram ...
What does this typically means?
Thanks