voormedia/rails-erd — Issue #27: rake task fails
Author: evan2m
Created: 2012-01-27 22:36:22+00:00
State: open

After running:

$ rake erd --trace

I get this:

Generating Entity-Relationship Diagram for 33 models...
Warning: Ignoring invalid association :tagger on ActsAsTaggableOn::Tagging (polymorphic interface Tagger does not exist)
Warning: Ignoring invalid association :tagger on ActsAsTaggableOn::Tagging (polymorphic interface Tagger does not exist)
rake aborted!
undefined method `name' for nil:NilClass
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/lib/active_support/whiny_nil.rb:48:in `method_missing'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/domain.rb:101:in `block (2 levels) in relationships_mapping'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/domain.rb:100:in `each'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/domain.rb:100:in `block in relationships_mapping'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/domain.rb:99:in `tap'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/domain.rb:99:in `relationships_mapping'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/domain.rb:77:in `relationships_by_entity_name'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/domain/attribute.rb:58:in `foreign_key?'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/domain/attribute.rb:40:in `content?'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/diagram.rb:178:in `block (2 levels) in filtered_attributes'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/diagram.rb:178:in `each'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/diagram.rb:178:in `none?'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/diagram.rb:178:in `block in filtered_attributes'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/diagram.rb:175:in `reject'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/diagram.rb:175:in `filtered_attributes'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/diagram.rb:129:in `block in generate'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/diagram.rb:128:in `each'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/diagram.rb:128:in `generate'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/diagram.rb:119:in `create'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/diagram.rb:74:in `create'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rails-erd-0.4.5/lib/rails_erd/tasks.rake:41:in `block (2 levels) in '
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `call'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `each'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:176:in `block in invoke_prerequisites'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:174:in `each'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:174:in `invoke_prerequisites'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:157:in `block in invoke_with_call_chain'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in top_level'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `each'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
/home/vagrant/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rake/application.rb:63:in `run'=

.....

It does not tell me which model it is processing when it fails.

Also, is there any way to include/exclude particular models from the diagram? I didn't see one in the docs.