Forum: Ruby on Rails Getting gem rdoc via ri?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F8fd54072606eaf5603484e756672034?d=identicon&s=25 John Wells (Guest)
on 2006-01-27 20:45
Guys,

I'm working with the new RadRails release (0.5.3), which has a very
nifty inclusion of ri courtesy of RDT.

Problem is, although I've generated rdoc for all installed gems with
"gem rdoc --all", it's not accessible through ri. I see some posts here
and there about rimport...is this still the necessary way to incorporate
the rails rdoc into ri?

Thanks!
John
F8fd54072606eaf5603484e756672034?d=identicon&s=25 John Wells (Guest)
on 2006-01-30 15:34
Guys,

I posted my question to the Ruby list and got a few very good
responses...here was my solution, FYR:
---------------------------------------------------------
Apparently, someone had already thought of doing this and didn't, as
evidenced by the following lines in rubygems/doc_manager.rb:

 #TODO: Why is this throwing an error?
          #ri = RDoc::RDoc.new
          #ri.document(['-R'] + source_dirs)

Anyway, I was successful...I'll look at making this more integrated and
submitting as a patch, but for the quick hack all it took was changing
the following line (58 in my version):

r.document(['--quiet', '--op', rdoc_dir] + @rdoc_args.flatten +
source_dirs)

to:

r.document(['--quiet', '--op', '--merge', '-r', '--ri-system', rdoc_dir]
+ @rdoc_args.flatten + source_dirs)

It worked perfectly...all Rails classes, etc, are now in ri.

Thanks guys!

John
5b279d677924919326946ef11330d3e4?d=identicon&s=25 Brandt Lofton (Guest)
on 2006-01-30 18:50
(Received via mailing list)
This is a great tip.. Thanks a TON...
This topic is locked and can not be replied to.