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

Error while evaluating sdoc/index.rhtml: undefined method `include?' for nil:NilClass #145

Open
mckeed opened this issue Nov 17, 2020 · 7 comments

Comments

@mckeed
Copy link

mckeed commented Nov 17, 2020

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=\"")
@p8
Copy link
Member

p8 commented Nov 17, 2020

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.

@manuelmeurer
Copy link
Contributor

I'm getting the same error with sdoc 2.0.3.
Anything I can do to help fix this, @p8?

@manuelmeurer
Copy link
Contributor

manuelmeurer commented Feb 22, 2021

@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?

@p8
Copy link
Member

p8 commented Feb 23, 2021

@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

@manuelmeurer
Copy link
Contributor

manuelmeurer commented Feb 26, 2021

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!

@zacheryph
Copy link

zacheryph commented Nov 4, 2022

The simple solution to this problem is adding -m README.md (or some other main file) to the arguments when calling sdoc.

@p8
Copy link
Member

p8 commented Nov 5, 2022

I've just merged: https://github.com/zzak/sdoc/pull/189
Which should probably fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants