Rails API in ri
by kit
WARNING: This seems to have messed up ri on my system. The new documentation is there, but some of the old documentation seems to be missing. `ri Array` yields no info, for example. So, please use carefully!
Would you like to be able to search and access the Rails API documentation offline via the Ruby command line utility ri? All you need to do is install RDoc for all Rails related gems. Note that this will take a while.
If you would like this to run faster, remove old versions Rails with the gem cleanup command. Note that this WILL remove old versions of Rails from your computer.
- remove old gems so that you don’t install RDoc for them sudo gem cleanup
And to install the documentation:
- cd to the rubygems directory cd `gem environment gemdir`/gems
- turn on extglob shopt -s extglob
- run rdoc -Y in every gem’s subdirectory, other than the rails dir for d in !(rails)/; do cd ”$d”; sudo rdoc -Y; cd ..; done
Now you can type `ri link\_to` and get all the API documentation on the Rails function `link\_to`.



