Bugs: Browse | Submit New | Admin

[#11369] superclass mismatch for class Item (TypeError)

Date:
2007-06-05 11:49
Priority:
3
Submitted By:
Hans de Graaff (graaff)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
superclass mismatch for class Item (TypeError)

Detailed description
I've just tried to use railroad 0.4.0 on an application we are developing, but I'm getting the following error while
trying to create the model diagram:

./app/models/config_manager.rb:29: superclass mismatch for class Item (TypeError)
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in
`new_constants_in'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require'
        from /usr/lib/ruby/gems/1.8/gems/railroad-0.4.0/lib/railroad/models_diagram.rb:36:in `load_classes'
        from /usr/lib/ruby/gems/1.8/gems/railroad-0.4.0/lib/railroad/models_diagram.rb:36:in `each'
        from /usr/lib/ruby/gems/1.8/gems/railroad-0.4.0/lib/railroad/models_diagram.rb:36:in `load_classes'
        from /usr/lib/ruby/gems/1.8/gems/railroad-0.4.0/lib/railroad/app_diagram.rb:21:in `initialize'
        from /usr/lib/ruby/gems/1.8/gems/railroad-0.4.0/lib/railroad/models_diagram.rb:14:in `initialize'
        from /usr/lib/ruby/gems/1.8/gems/railroad-0.4.0/bin/railroad:31:in `new'
        from /usr/lib/ruby/gems/1.8/gems/railroad-0.4.0/bin/railroad:31
        from /usr/bin/railroad:16:in `load'
        from /usr/bin/railroad:16


The offending lines in config_manager are:

  class Item < Struct.new(:name, :ruby_type, :default)
  end
  
This is code I actually borrowed from Typo at some point. I just noticed that the settings mechanism in typo has been
updated, so perhaps this code should be updated also. In any case, Railroad should probably handle this in some manner
instead of crashing.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-04-15 14:38
Sender: Hans de Graaff

Revisiting this issue I noticed that it is actually easy
enough to exclude this file with the --exclude option.

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item