May 10, 2007

Offline Rails API Doc

What do why's movies have in common with RDoc?

Well, they both deal with the Ruby programming language and they both formed a part of a talk at last night's Sydney Rails meetup. Apparently Tim Lucas was concerned that his RDoc material may be a little dry so he interspersed it with some whacky why humour.

Anyway, to the point of this post. I often find myself doing Rails development offline whilst I'm commuting on the train. So having the Rails API doc handy is invaluable. As Tim pointed out, one way of producing the Rails RDoc is using:

rake doc:rails

from within a freshly created rails project directory. However, as I discovered today, there is a trap to watch out for. Make sure you freeze rails first, for example as follows:

rake rails:freeze:gems

This unpacks the gems into vendor/rails. Otherwise rake will abort with the following message:

Don't know how to build task 'vendor/rails/railties/CHANGELOG'

That is all.

Posted to Rails by Keith Pitty
Comments

Hi, thanks for this tip! :)

Posted by: chris at January 21, 2008 4:14 PM
Post a comment









Remember personal info?