Error while evaluating sdoc/index.rhtml: undefined method `include?' for nil:NilClass
mckeed opened this issue · 8 comments
I'm getting an error when I try to use sdoc 2.0.2 on the rspec-core gem that I don't get with sdoc 1.1.0.
I've reproduced with ruby 2.6.6 and 2.7.0
I get the following when running just $ sdoc
in the gem directory for rspec-core 3.6.0
Generating SDoc format into ~/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rspec-mocks-3.6.0/doc...
uh-oh! RDoc had a problem:
Error while evaluating ~/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/sdoc-2.0.2/lib/rdoc/generator/template/sdoc/index.rhtml: undefined method `include?' for nil:NilClass (at "l\" title=\"Search\" name=\"panel\" />\n <frame src=\"")
The sdoc template needs to be updated to use the new frameless turbolinks version.
I started working on this but haven't finished it yet.
I'm getting the same error with sdoc 2.0.3.
Anything I can do to help fix this, @p8?
@zzak Do you know what the status is with this issue?
Currently sdoc seems to be unusable.
I'd love to help out to get this resolved if someone could point me in the right direction!
The docs on https://api.rubyonrails.org/ seem to use Turbolinks, are they generated with sdoc v2?
@manuelmeurer The Rails API docs use the v2 version.
You should be able to run the v1 version which doesn't use Turbolinks.
I started working on fixing the sdoc template, but haven't found time to finish it:
https://github.com/p8/sdoc/tree/update-sdoc-template
I get the same undefined method 'include?' for nil:NilClass
error when trying to generate the docs for Rails, so I'm wondering how the Rails API docs have been generated?
Please let me know if I can help with updating the sdoc template!
The simple solution to this problem is adding -m README.md
(or some other main file) to the arguments when calling sdoc
.
I've just merged: https://github.com/zzak/sdoc/pull/189
Which should probably fix this issue.