Martin Ankerl wrote:
>> Can you tell me how to get fxri to pickup 3rd party documentation,
>> e.g. gems.  I'd love to be able to use it for Rails documentation.
> 
> 
> fxri uses the same source as ri, so you have to use
> rdoc -r sourcedirectory
> to generate the ri documentation. E.g. to generate the fxruby docs, I 
> have done this:
> 
> rdoc -r /usr/lib/ruby/gems/1.8/gems/fxruby-1.2.3/rdoc-sources
> 
> voila, more than 1500 new entries for fxri :-)


But, be warned: if you are not careful with what you import into ri, you 
can add entries to core library ri info (if any new source doc modifies 
core classes)

Also, there may be a bug related to 3rd party docs (or, more 
specifically, docs that do not fit a certain structure expected by ri ).

I just installed fxri via rubygems, and saw that the ri data for my 
Catapult library was available.  All the entries are prefixed 
Neurogami::Catapult; as I type out most of the first term, I get an 
exception:

c:/ruby/lib/ruby/1.8/rdoc/ri/ri_descriptions.rb:99:in `concat': cannot 
convert nil into Array (TypeError)
         from c:/ruby/lib/ruby/1.8/rdoc/ri/ri_descriptions.rb:99:in 
`merge_in'
         from c:/ruby/lib/ruby/1.8/rdoc/ri/ri_reader.rb:56:in `get_class'
         from c:/ruby/lib/ruby/1.8/rdoc/ri/ri_reader.rb:52:in `each'
         from c:/ruby/lib/ruby/1.8/rdoc/ri/ri_reader.rb:52:in `get_class'
         from 
c:/ruby/lib/ruby/gems/1.8/gems/fxri-0.1.0/./lib/RiManager.rb:102:in 
`report_class_stuff'
         from 
c:/ruby/lib/ruby/gems/1.8/gems/fxri-0.1.0/./lib/RiManager.rb:96:in `show'
         from c:/ruby/lib/ruby/gems/1.8/gems/fxri-0.1.0/./fxri:262:in 
`on_show'
         from c:/ruby/lib/ruby/gems/1.8/gems/fxri-0.1.0/./fxri:270:in 
`show_info'
          ... 10 levels...
         from c:/ruby/lib/ruby/gems/1.8/gems/fxri-0.1.0/./fxri:292:in `run'
         from c:/ruby/lib/ruby/gems/1.8/gems/fxri-0.1.0/./fxri:292
         from c:/ruby/bin/fxri:19:in `load'
         from c:/ruby/bin/fxri:19


I get essentially the same error if I run
c:\>ri Neurogami
at the command line.

But in that instance I have no reason to do that; I'd type out the full 
prefix before hitting Enter.

It seems that fxri dies on exceptions percolated up from ri, and the 
dynamic search-while-typing part using ri barfs midway through 
Neurogami::Catapult, as nothing is defined for just that first term.

Seems that if you have docs in the name space Foo::Bar, and Foo is (I'm 
guess) empty in some ri-special way, fxri breaks when it tries to call 
"ri Foo".

James