views:

467

answers:

4

I recently installed RailRoad gem to generate an .svg diagram of my app's models and controllers.

The rake task keeps breaking with a similar error:

1.8/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:263:in `load_missing_constant': uninitialized constant

I tried the rake task on 2 seperate apps and the error keeps appearing with a different "constant" name.

Anyone using it with similar problems?

+1  A: 

I'm running it without any problems (though I did have to make a quick edit as it was representing the crows feet the wrong way).

This problem also appears to be in their tracker. I would go ahead and add your stack trace to that ticket as well. I'm curious if it's your version of ActiveSupport? Bur your version and the version in use are both displaying the same problem so there's got to be a similarity somewhere.

mwilliams
A: 

thanks for that mwilliams.

Just had a look to their tracker, there's a link to a possible patch but apparently not working

cnicolaou
A: 

could you post the full stack trace? I wonder if you had the same problem as me today:

user@laptop:11:15 AM:rails_app> rake doc:diagrams
(in /Users/ivan/Sites/lqas)
railroad -i -l -a -m -M | dot -Tsvg | sed 's/font-size:14.00/font-size:11.00/g' > doc/models.svg
railroad -i -l -C | neato -Tsvg | sed 's/font-size:14.00/font-size:11.00/g' > doc/controllers.svg
Error loading controller classes.
  (Are you running railroad on the aplication's root directory?)

/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- app/controllers/application.rb (MissingSourceFile)
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
        from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/railroad-0.5.0/lib/railroad/controllers_diagram.rb:39:in `load_classes'
        from /usr/local/lib/ruby/gems/1.8/gems/railroad-0.5.0/lib/railroad/app_diagram.rb:21:in `initialize'
        from /usr/local/lib/ruby/gems/1.8/gems/railroad-0.5.0/lib/railroad/controllers_diagram.rb:14:in `initialize'
        from /usr/local/lib/ruby/gems/1.8/gems/railroad-0.5.0/bin/railroad:38:in `new'
        from /usr/local/lib/ruby/gems/1.8/gems/railroad-0.5.0/bin/railroad:38
        from /usr/local/bin/railroad:19:in `load'
        from /usr/local/bin/railroad:19

I had to comment out the line in lib/railroad/controllers_diagram.rb where it looks for applicaton.rb instead of application_controller.rb as it's now called.

Ivanoats
A: 

Ivan, and others, try using Bryan Larsen's version from Github: http://github.com/bryanlarsen/railroad

Cameron Walsh