Tip: searchable Rails api docs from within RadRails!

Just a tip for those of you using RadRails. If you install the new
rubygems 0.9.0, you can type “gem rdoc --all --ri” at the command line.
Then, open up RadRails, go to Window->Preferences->Ruby->Ri/rdoc and
change your ri path to the path to gemri (which gemri). Finally, open up
your RI Eclipse view and voila…indexed, searchable rails api docs at
your finger tips!

This feature is worth its weight in gold. Btw, using the --all flag will
generate ri for ALL installed gems, so you may want to limit that (or do
a “gem clean” beforehand to eliminate old versions)…if you have
multiple rails versions install that you generate ri for, the utility
gets confused.

John

On 7/8/06, John W. [email protected] wrote:

multiple rails versions install that you generate ri for, the utility
gets confused.

John

If you aren’t using RadRails, I suggest getting DevBoi’s firefox
extension to have offline docs for Ruby, Rails, not to mention the
HTML/CSS/DOM docs. Its fantastic to have everything quickly
searchable, even when offline or w/ limited connectivity.

Its right here: http://www.martincohen.info/products/devboi/

  • Rob

On 7/8/06, John W. [email protected] wrote:

Just a tip for those of you using RadRails. If you install the new
rubygems 0.9.0, you can type “gem rdoc --all --ri” at the command line.
Then, open up RadRails, go to Window->Preferences->Ruby->Ri/rdoc and
change your ri path to the path to gemri (which gemri). Finally, open up
your RI Eclipse view and voila…indexed, searchable rails api docs at
your finger tips!

Great tip! I didn’t even realize RadRails had an RI view. Very handy.

However, when I tried it, while I get the list of methods in the
left-hand
panel of the RI view, clicking on them doesn’t bring up anything in the
right-hand panel.

I have the path to gemri properly listed.

(I originally had duplicates of some gems, which showed duplicates of
the
methods in the list. But I got rid of those and re-ran the gemri --rdoc
command, so that the list now only shows one of each method. However,
the
documentation itself still doesn’t appear. Do you think it’s screwed up
because I originally had duplicates? Or is there something else that
needs
to be activated for this to work?)

Out of curiosity, why does the command in RadRails need to be changed
from
ri to gemri? Aren’t those essentially the same program?

Thanks for any help.

François Montel wrote:

However, when I tried it, while I get the list of methods in the
left-hand
panel of the RI view, clicking on them doesn’t bring up anything in the
right-hand panel.

I have the path to gemri properly listed.

(I originally had duplicates of some gems, which showed duplicates of
the
methods in the list. But I got rid of those and re-ran the gemri --rdoc
command, so that the list now only shows one of each method. However,

Hmm…did you specify gem rdoc --all --ri?

Out of curiosity, why does the command in RadRails need to be changed
from
ri to gemri? Aren’t those essentially the same program?

gem ri docs are stored in non-standard directories, I believe. All gemri
does is add those directories to the ri search path…

John

On 7/10/06, John W. [email protected] wrote:

Hmm…did you specify gem rdoc --all --ri?

yes. And executing gemri from the command line yields the
proper
documentation. But somehow RadRails is not referencing it.

i have the same issue running the most recent RadRails on Ubuntu with a
gem
installation.

ed