Visualizing a rails application using Railroad on Ubuntu or Debian

I wanted to finally explore the various tools for creating graphs of Rails models. I’ve been wanting to do so for a while because such graphs can really help when developing an application. I really wanted something that was a gem and not a plugin and I found that Railroad was just what I was looking for. Rails Application Visualizer seems to have been abandoned and is a plugin and Visualize Models is also a plugin. Here’s how I installed and used Railroad.

Installation

  • sudo gem install railroad
  • `sudo aptitude install graphviz’

Usage

From within a rails project directory I ran the following to create a png file of the models:

  • `railroad -M -l -i -a | dot -Tpng > models.png

And for controllers:

  • `railroad -C -l -i | dot -Tpng > controllers.png

For help with railroad usage and options:

  • railroad -h

Trackback URL for this post:

http://hightechsorcery.com/trackback/113
Creative Commons License Except where otherwise noted, content on this site is licensed under a Creative Commons by-nc-sa 3.0 License