November 26th, 2008 04:57   |   Category: Ruby on Rails

RailRoad is a class diagrams generator for Ruby on Rails applications.1

Installation


$ sudo apt-get install graphviz
$ sudo gem install railroad

Generating Diagrams

Generating models diagram in .dot file format and converting it to png:


$ railroad -o models.dot -M
$ dot -Tpng models.dot > models.png
Models diagram of sopar

Models diagram in svg format.


$ railroad -M | dot -Tsvg > models.svg

Models diagram with all classes showing inheritance relations


$ railroad -a -i -o full_models.dot -M

Controllers diagram in png format.


$ railroad -C | neato -Tpng > controllers.png

Resources

1 Railroad gem
Graphviz
Ruby on rails diagram generator – RailRoad