[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Problem generaing RDoc documentation for gems

almostobsolete@gmail.com

7/7/2005 12:58:00 PM

Hi,

I hope this is the right place to ask, I know there's a rails list as
well but this does seem to me to be a more general problem with my
setup.

I've been trying to generate CHM documentation for rails by switching
to "\ruby\lib\ruby\gems.8\gems" and running "rdoc -f chm -o chm_folder
action* rails-*" but it keeps failing. The last few lines are:

controller_generator.rb: c.
controller.rb: c
rails-0.12.1/lib/rails_generator/generators/components/controller/templates/cont
roller.rb:3:15: Expected class name or '<<'. Got RubyToken::TkLT: "<"
.

After that it just freezes.

I'm running windows, I used the windows installer to install ruby and
gems to install rails.

Any help would be very much appreciated. Thanks

-tom

3 Answers

Lothar Scholz

7/7/2005 1:14:00 PM

0

Hello almostobsolete,

agc> Hi,

agc> I hope this is the right place to ask, I know there's a rails list as
agc> well but this does seem to me to be a more general problem with my
agc> setup.

agc> I've been trying to generate CHM documentation for rails by switching
agc> to "\ruby\lib\ruby\gems.8\gems" and running "rdoc -f chm -o chm_folder
agc> action* rails-*" but it keeps failing. The last few lines are:

agc> controller_generator.rb: c.
agc> controller.rb: c
agc> rails-0.12.1/lib/rails_generator/generators/components/controller/templates/cont
agc> roller.rb:3:15: Expected class name or '<<'. Got RubyToken::TkLT: "<"
agc> ..


agc> After that it just freezes.

Yes, this is a well known problem. Please post it to the ruby on rails
mailing list and tell mr. David Heinemeier Hensen that he should fix
this in the rails package by adding an empty ".document" put this into
the templates directory. As this templates should not be added to RDOC.

Or even better tell him that this templates should not have the *.rb
extension.

It's so easy to fix but instead he added a patch to RubyGems
(has_rdoc specification option) that prevents RDOC generation
... oh wait i should stop now before i get too unpolite.

--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ru...
CTO Scriptolutions Ruby, PHP, Python IDE 's




almostobsolete@gmail.com

7/7/2005 1:39:00 PM

0

Thanks, creating the .document file seems to have solved that problem.
Unfortunatly it's now coming up with a new error:

Generating CHM...
c:/ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:1286:in
`initialize': Inv
alid argument - classes/<.html (Errno::EINVAL)
from
c:/ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:1286:in `ope
n'
from
c:/ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:1286:in `gen
_into'
from
c:/ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:1282:in `eac
h'
from
c:/ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:1282:in `gen
_into'
from
c:/ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:1270:in `gen
erate_html'
from
c:/ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:1190:in `gen
erate'
from
c:/ruby/lib/ruby/1.8/rdoc/generators/chm_generator.rb:38:in `genera
te'
from c:/ruby/lib/ruby/1.8/rdoc/rdoc.rb:263:in `document'
from c:/ruby/bin/rdoc:63

Any ideas?

-tom

Lothar Scholz wrote:
> Hello almostobsolete,
>
> agc> Hi,
>
> agc> I hope this is the right place to ask, I know there's a rails list as
> agc> well but this does seem to me to be a more general problem with my
> agc> setup.
>
> agc> I've been trying to generate CHM documentation for rails by switching
> agc> to "\ruby\lib\ruby\gems.8\gems" and running "rdoc -f chm -o chm_folder
> agc> action* rails-*" but it keeps failing. The last few lines are:
>
> agc> controller_generator.rb: c.
> agc> controller.rb: c
> agc> rails-0.12.1/lib/rails_generator/generators/components/controller/templates/cont
> agc> roller.rb:3:15: Expected class name or '<<'. Got RubyToken::TkLT: "<"
> agc> ..
>
>
> agc> After that it just freezes.
>
> Yes, this is a well known problem. Please post it to the ruby on rails
> mailing list and tell mr. David Heinemeier Hensen that he should fix
> this in the rails package by adding an empty ".document" put this into
> the templates directory. As this templates should not be added to RDOC.
>
> Or even better tell him that this templates should not have the *.rb
> extension.
>
> It's so easy to fix but instead he added a patch to RubyGems
> (has_rdoc specification option) that prevents RDOC generation
> .. oh wait i should stop now before i get too unpolite.
>
> --
> Best regards, emailto: scholz at scriptolutions dot com
> Lothar Scholz http://www.ru...
> CTO Scriptolutions Ruby, PHP, Python IDE 's

llothar

7/7/2005 5:35:00 PM

0

As i currently work on RDOC/RI i will look into this over the next
weekend. At the moment i can only say a bug in "html_generator.rb" is
not so easy to fix - normally.