Sun, 29 Jul 2007
Creating your own Rails API documentation
The second edition of the “Agile Web Development with Rails” book has the following tip for creating the Rails API docs from the latest gem version on your machine (or you could get the edge version by using rake rails:freeze:edge).
$ rails dummy_app $ cd dummy_app $ rake rails:freeze:gems $ echo >vendor/rails/activesupport/README $ rake doc:rails
After it completes simply copy the api folder inside the doc directory (and then you can delete the dummy_app).
Another related tip for those who haven’t yet discovered the site gotapi.com is a great reference with find-as-you type api searching.


Another possibility for having the Rails API doc on your computer is simply to use the one that is already there. Since Rails is installed via a gem, you can youse the comand line program gem_server, that will start a Webrick on localhost:8808 with a reference to all RDocs for your locally installed gems, that include as well Rails.