Rdoc zerodivide error

When I try to use rdoc I’m getting a zerodivide error. Rdoc claims that
the problem is that it isn’t a real ruby compiler, but the ruby compiler
doesn’t complain at all. And rdoc doesn’t tell me WHERE in the program
it’s running into problems.

FWIW, yard doesn’t complain, but if it’s generating documentation, I
can’t figure out where it’s putting it.

This is enough of a problem to make Ruby unusable for me. Is there
some way of telling WHERE the error is occurring? Or what in my
documentation is causing it?

On Aug 27, 2013, at 12:37, Charles H. [email protected]
wrote:

When I try to use rdoc I’m getting a zerodivide error. Rdoc claims that the
problem is that it isn’t a real ruby compiler, but the ruby compiler doesn’t
complain at all. And rdoc doesn’t tell me WHERE in the program it’s running into
problems.

FWIW, yard doesn’t complain, but if it’s generating documentation, I can’t
figure out where it’s putting it.

This is enough of a problem to make Ruby unusable for me. Is there some way of
telling WHERE the error is occurring? Or what in my documentation is causing it?

What gem or project are you using rdoc on? What version of rdoc?

If you run with --debug rdoc will give you more information that I can
use to fix your bug.

On 08/27/2013 01:40 PM, Eric H. wrote:

On Aug 27, 2013, at 12:37, Charles H. [email protected] wrote:

When I try to use rdoc I’m getting a zerodivide error. Rdoc claims that the
problem is that it isn’t a real ruby compiler, but the ruby compiler doesn’t
complain at all. And rdoc doesn’t tell me WHERE in the program it’s running into
problems.

FWIW, yard doesn’t complain, but if it’s generating documentation, I can’t
figure out where it’s putting it.

This is enough of a problem to make Ruby unusable for me. Is there some way
of telling WHERE the error is occurring? Or what in my documentation is causing
it?
What gem or project are you using rdoc on? What version of rdoc?

If you run with --debug rdoc will give you more information that I can use to
fix your bug.
I’m using rdoc on code that I was in the process of writing. I got the
result with ruby1.9.1 and have just installed ruby 2.0.0p247 (2013-06-27
revision 41674) [x86_64-linux]

Actually, with yesterday’s install (Rdoc 4.0.0, the problems seem to
have changed, becoming extremely much less critical.
…dala1:~/projects/Ruby/cells$ rdoc --html -a -o rdoc --debug
cellsdb.rb
yields:
invalid options: --html
but seems to generate the correct output. (I’m sure that was a valid
option the last time I checked…but it’s not listed now.)

Now the problem is essentially simple. I can’t stand reading text on a
black background, and darkfish uses that. And a search on Google hasn’t
shown me any examples of alternatives. Fivefish, e.g., is mentioned,
but I haven’t seen any examples. Allison looks good, but seems to have
disappeared. Jamis looks good, but the install instructions don’t
work. (Can’t find jamis.rb) Another by Dave T. is unmaintained and
only known to work with rdoc 2.3.0.

So now (i.e., as of yesterday night’s install) the problem is not
precisely with RDoc, but with the available templates. I find darkfish
unreadable (well, where it’s text against a black background, but that’s
enough).

ARE there any working alternatives? Preferably something that looks
sort of like jamis ( Buckblog: RDoc Template
) or Allison (
Allison: New Template for RDoc-Produced Documentation
)

On 08/27/2013 04:36 PM, Eric H. wrote:

Now the problem is essentially simple. I can’t stand reading text on a black
background, and darkfish uses that. And a search on Google hasn’t shown me any
examples of alternatives. Fivefish, e.g., is mentioned, but I haven’t seen any
examples. Allison looks good, but seems to have disappeared. Jamis looks good,
but the install instructions don’t work. (Can’t find jamis.rb) Another by Dave
Thomas is unmaintained and only known to work with rdoc 2.3.0.
.ruby-constant { color: black; font-weight: bold }

CONSTANT = /regexp/ =~ “some #{string}”

I’ll never be able to pick a color scheme and layout that everyone is happy
with, but I am open to updating or replacing the current scheme. For the next
release of RDoc I’m working on a modified layout that will have a shorter sidebar
for class pages.

Here’s a work-in-progress example page that needs changes to the style before it
is releasable:

http://rubygems.rubyforge.org/rubygems-update/Gem/Package.html

The only problem with that solution is:
…uby/cells$ rdoc -a -w 3 -o rdoc --template-stylesheets rdoc.css
cellsdb.rb
invalid options: --template-stylesheets
(invalid options are ignored)

Where I copied your my.css into a file in the local dict called rdoc.css
(because I wanted to remember what it was for). It says the same thing
when I use the --style option indicated by the man file. rdoc --help
doesn’t seem to list anything that appears appropriate. Was I supposed
to copy it into
/usr/local/lib/ruby/2.0.0/rdoc/generator/template/darkfish ? (If so I’d
better give it a different name.) And access it via the file name minus
the extension? I hesitate to do that without being told explicitly that
that’s what I should do.

On Aug 27, 2013, at 17:25, Charles H. [email protected]
wrote:

The only problem with that solution is:
…uby/cells$ rdoc -a -w 3 -o rdoc --template-stylesheets rdoc.css cellsdb.rb
invalid options: --template-stylesheets
(invalid options are ignored)

Where I copied your my.css into a file in the local dict called rdoc.css
(because I wanted to remember what it was for). It says the same thing when I use
the --style option indicated by the man file. rdoc --help doesn’t seem to list
anything that appears appropriate. Was I supposed to copy it into
/usr/local/lib/ruby/2.0.0/rdoc/generator/template/darkfish ? (If so I’d better
give it a different name.) And access it via the file name minus the extension? I
hesitate to do that without being told explicitly that that’s what I should do.

Sorry, I forgot to check which version of rdoc I was using.
–template-stylesheets is a new feature that hasn’t been released yet,
but I plan to have it ready in the next two weeks.

On Aug 27, 2013, at 15:23, Charles H. [email protected]
wrote:

I’m using rdoc on code that I was in the process of writing. I got the result
with ruby1.9.1 and have just installed ruby 2.0.0p247 (2013-06-27 revision 41674)
[x86_64-linux]

Actually, with yesterday’s install (Rdoc 4.0.0, the problems seem to have
changed, becoming extremely much less critical.
…dala1:~/projects/Ruby/cells$ rdoc --html -a -o rdoc --debug cellsdb.rb
yields:
invalid options: --html
but seems to generate the correct output. (I’m sure that was a valid option
the last time I checked…but it’s not listed now.)

You were probably using RDoc 2.x or 3.x. One of those had a zero
division error and supported the --html option. RDoc ignores invalid
options by default, but does warn about them.

Now the problem is essentially simple. I can’t stand reading text on a black
background, and darkfish uses that. And a search on Google hasn’t shown me any
examples of alternatives. Fivefish, e.g., is mentioned, but I haven’t seen any
examples. Allison looks good, but seems to have disappeared. Jamis looks good,
but the install instructions don’t work. (Can’t find jamis.rb) Another by Dave
Thomas is unmaintained and only known to work with rdoc 2.3.0.

You can provide an override stylesheet, here’s one with some poor color
choices using the --template-stylesheets option:

$ rdoc --template-stylesheets my.css test.rb

$ cat my.css
pre {
color: black;
background: white;
}

.ruby-constant { color: black; font-weight: bold }
.ruby-keyword { color: black }
.ruby-ivar { color: olive }
.ruby-operator { color: navy }
.ruby-identifier { color: navy }
.ruby-node { color: black }
.ruby-comment { color: red }
.ruby-regexp { color: purple }
.ruby-value { color: green }

Here’s a test file to use with it:

$ cat test.rb

This is a test of white on black styling

# this is a syntax test

def my_method

@var + 1

end

CONSTANT = /regexp/ =~ “some #{string}”

class C
end

You can set your stylesheet overrides for all HTML generation with the
RDOCOPT environment variable, see rdoc --help

So now (i.e., as of yesterday night’s install) the problem is not precisely with
RDoc, but with the available templates. I find darkfish unreadable (well, where
it’s text against a black background, but that’s enough).

ARE there any working alternatives? Preferably something that looks sort of
like jamis ( Buckblog: RDoc Template ) or Allison
(Allison: New Template for RDoc-Produced Documentation)

It seems that Jamis’ template has disappeared from the internet and
Allison is deprecated.

I’ll never be able to pick a color scheme and layout that everyone is
happy with, but I am open to updating or replacing the current scheme.
For the next release of RDoc I’m working on a modified layout that will
have a shorter sidebar for class pages.

Here’s a work-in-progress example page that needs changes to the style
before it is releasable:

http://rubygems.rubyforge.org/rubygems-update/Gem/Package.html

On 08/28/2013 06:01 PM, Eric H. wrote:

On Aug 27, 2013, at 17:25, Charles H. [email protected] wrote:

The only problem with that solution is:
…uby/cells$ rdoc -a -w 3 -o rdoc --template-stylesheets rdoc.css cellsdb.rb
invalid options: --template-stylesheets
(invalid options are ignored)

Where I copied your my.css into a file in the local dict called rdoc.css
(because I wanted to remember what it was for). It says the same thing when I use
the --style option indicated by the man file. rdoc --help doesn’t seem to list
anything that appears appropriate. Was I supposed to copy it into
/usr/local/lib/ruby/2.0.0/rdoc/generator/template/darkfish ? (If so I’d better
give it a different name.) And access it via the file name minus the extension? I
hesitate to do that without being told explicitly that that’s what I should do.
Sorry, I forgot to check which version of rdoc I was using.
–template-stylesheets is a new feature that hasn’t been released yet, but I plan
to have it ready in the next two weeks.
OK. Thank you.