ruby script/plugin install svn://rubyforge.org//var/svn/visualizemodels/visualize_modelsRun the plugin with:
rake visualize_modelsThis plugin depends on GraphViz, which you can find here.
If you're a Mac user, the Darwin port of GraphViz seems to work better. Just do:
sudo port install graphvizThis program has its roots in the Annotate Models by Dave Thomas. See also the RubyForge project page for additional info.
In addition to Visualize Models there are two (that I'm aware of) other projects that you can use to visualize the database in Ruby On Rails:
If you know about any additional resources to visualize rails models, please drop me a mail at nils@<this domain>.
Update: Fixed the ActiveSupport::Inflector in SVN now as noted in the comments. Visualize_models works out of the box for rails 2.2.2 and later now

I have have installed grapviz on my windows XP and Visualize Models. But when I do rake visualize_models, it looked at all my tables but "failed to execute the 'neato' command"
ReplyDeleteMake sure that neato and dot is in your path and that you can start them from the command prompt.
ReplyDeleteCheers for this plugin. It's been very useful
ReplyDeleteFirst, thanks for the plugin! After installation, I ran into a problem that Visualize::Inflector was not found. This was easily resolved by using ActiveSupport::Inflector in visualize_models.rb.
ReplyDeleteI'm a newbie on RoR and I get the message error 'Visualize::Inflector was not found' and I don't understand David medinets comment on how to address that. I can't find any reference to 'Inflector' in the .rb file.
ReplyDeleteI run on Mac OSX and the command "sudo port install graphviz" doesn't work either..
‘Visualize::Inflector was not found’ - it appears with the rails = 2.2.2, switch to 2.1 to generate your models if you are in hurry
ReplyDeleteIs there a way to pass parameters with this class. I would like to do some of the tables in the model. Current it does ever table.
ReplyDeletesacredceltic: look in the visualize_models.rb file, and replace every "Inflector" with "ActiveSupport::Inflector". That should fix your error.
ReplyDeleteHi Nils,
ReplyDeletenice program ;-))
Is there a way to keep the GraphViz dot file ?
I like to add some additional information into it before creating the png image.