Ruby Railroad图生成器在Enumerable :: Enumerator中以[]的NoMethodError失败

时间:2009-08-27 08:05:29

标签: ruby-on-rails schema uml ruby-on-rails-plugins

我正在尝试使用铁路宝石生成模型图。我已经设法为不同的应用程序生成一个图表,但我试图了解一些“遗留”代码,并继续遇到问题。

我对红宝石或铁轨知之甚少,所以任何帮助都会受到赞赏......

基本上,我跑:

$ railroad -v -M

并获得:

Loading application environment
Loading application classes
./config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/core_ext/string/access.rb:43:in `first': undefined method `[]' for #<Enumerable::Enumerator:0xb70a72d0> (NoMethodError)
from ./config/../vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:70:in `has_attachment'
from ./app/models/asset.rb:5
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from ./config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in `require'
from ./config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
from ./config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in `require'
from /home/myname/.gem/ruby/1.8/gems/railroad-0.5.0/lib/railroad/models_diagram.rb:40:in `load_classes'
from /home/myname/.gem/ruby/1.8/gems/railroad-0.5.0/lib/railroad/models_diagram.rb:40:in `each'
from /home/myname/.gem/ruby/1.8/gems/railroad-0.5.0/lib/railroad/models_diagram.rb:40:in `load_classes'
from /home/myname/.gem/ruby/1.8/gems/railroad-0.5.0/lib/railroad/app_diagram.rb:21:in `initialize'
from /home/myname/.gem/ruby/1.8/gems/railroad-0.5.0/lib/railroad/models_diagram.rb:14:in `initialize'
from /home/myname/.gem/ruby/1.8/gems/railroad-0.5.0/bin/railroad:36:in `new'
from /home/myname/.gem/ruby/1.8/gems/railroad-0.5.0/bin/railroad:36
from /home/myname/.gem/ruby/1.8/bin/railroad:19:in `load'
from /home/myname/.gem/ruby/1.8/bin/railroad:19

我尝试重新安装attachment_fu(它已经在vendor / plugins文件夹中),但似乎没有帮助。

如果架构出现问题,我不会感到惊讶 - 我已经不得不修改列名中的拼写错误,缺少引用,这类事情。无论如何,我可以找出它可能会死的地方吗?

非常感谢!

1 个答案:

答案 0 :(得分:0)