Darkfish rdoc sees no rdoc

Hi, I have trouble with rdoc. I run ruby 1.9.2p290 and I installed
darkfish-rdoc-1.1.5.gem
When I run the gem’s rdoc (it installs in /usr/local/bin) on a directory
that only contains this file test.rb:

#!/usr/bin/ruby
=begin rdoc
== test - This is a test
=== Description
I’m trying to generate documentation from this file.
=end
puts ‘Hello World!’

then I get a doc directory which does not contain any information from
between the =begin and =end.
There are two html files: index.html and table_of_contents.html.
I have attached the output as seen in my web browser.
What am I doing wrong?

On Feb 18, 2012, at 2:06 AM, Wybo D. wrote:

=end
puts ‘Hello World!’

then I get a doc directory which does not contain any information from
between the =begin and =end.
There are two html files: index.html and table_of_contents.html.
I have attached the output as seen in my web browser.
What am I doing wrong?

Darkfish is the default now for RDoc, and the gem is way out of date.
Just uninstall the gem, make sure your RDoc is up to date, and you
should be good to go.

I’ll update the Darkfish project page to avoid this kind of confusion.

Well, I removed all ruby stuff I had, downloaded ruby-1.9.3-p0.tar.gz,
compiled and installed it, but the output is the same: the generated doc
does not contain any relevant information.

Is the following ok?:
$ ruby --version
ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
$ rdoc --version
rdoc 3.12

This is what I tried:

$ cd tmp
$ ls
test.rb
$ cat test.rb
#!/usr/bin/env ruby
=begin rdoc
== test - This is a test
=== Description
I’m trying to generate documentation from this file.
=end
puts ‘Hello World!’

$ rdoc .
Parsing sources…
100% [ 1/ 1] test.rb

Generating Darkfish format into /home/wybo/tmp/doc…

Files: 1

Classes: 0 (0 undocumented)
Modules: 0 (0 undocumented)
Constants: 0 (0 undocumented)
Attributes: 0 (0 undocumented)
Methods: 0 (0 undocumented)

Total: 0 (0 undocumented)
0.00% documented

Elapsed: 0.0s
$ grep -rl trying doc # ‘trying’ occurs in the documentation…
$

I might suggest that instead of trying rdoc on your own test file, to
instead go into a gem directory (bundler is the one I tried) and just do

$ rdoc

When I did this, rdoc created the usual doc directory inside of the
bundler-1.0.21 directory. ./doc contained an index.html and all the html
files for the documentation.

here was the setup:

ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
[email protected]:~/.rvm/gems/ree-1.8.7-2011.03/gems/bundler-1.0.21$

*** LOCAL GEMS ***

bundler (1.0.21)
json (1.6.5)
rdoc (3.12)

I was running rdoc inside an rvm gemset folder for ree-1.8.7, but that
shouldn’t make any difference – it should create valid docs for any
gem.

Not to muddy the waters, but if you haven’t checked out yard, I prefer
it somewhat over rdoc.

Dave

On 2012-02-20 15:01, David H. wrote:

I might suggest that instead of trying rdoc on your own test file, to
instead go into a gem directory (bundler is the one I tried) and just do

The confusion is, that I am talking about a simple Ruby application,
not a package of classes and methods.
I want documentation to explain what the application is good for. But
it seems that rdoc is only looking for documentation belonging to
classes and methods, and skips any other documentation.

What helps is to let the =begin rdoc … =end block be followed by some
(empty) class definition, for example:

=begin rdoc
== test - This is a test
=== Description
I’m trying to generate documentation from this file.
=end
class Documentation
end

puts “Hello World! I am an application to tell I was born.”

This shows, in Documentation.html:

class Documentation

test - This is a test

Description

I

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs