RoR-DOT Ruby script parses Ruby on Rails model files and generates visual diagrams - ER diagrams, SQL schema, UML class diagram - to help developers navigate in complext class trees and to document projects for customers. Instructions: 1. Place ruby file (diagram.rb) to srcipt folder. We assume Rails standard folders structure, i.e. diagram.rb lookups models at ../app/models and database connection at ../config 2. Run script as follows: ruby -I ../app/models diagram.rb output/file/name.dot [-s | m | o | b | t ] Options: s - sql mode (table names and foreign key fields); other options become irrelevant m - display :has_many associations only o - display :has_one associations only b - display :belongs_to associations only t - display :has_and_belongs_to only m, o, b, t options can be mixed - their output is combined, e.g. -mb will show :has_many and :belongs_to default: no options means -mobt 3. If everything goes well, the file will be created. Open it by any application that can visualize DOT files. On Mac OS, Graphviz is the best choice. OmniGraffle can also open DOT files and you can then edit the resulting graph. On Windows, Visio must open DOT files but I am not sure. On Linux classic dot utilities do the job. Please send me your ideas how to improve diagrams and what other types of graphs could be useful for developers on Rails.