Bugs: Browse | Submit New | Admin

[#21153] uninitialized constant all the time :(

Date:
2008-07-10 13:13
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
uninitialized constant all the time :(

Detailed description
Hi,

Railroad would simply have been what I needed, but I am not able to run it:

rene-hjorths-macbook:moneypot RHjorth$ railroad -M
/Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:266:in `load_missing_constant':
uninitialized constant Address (NameError)
	from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:453:in `const_missing'
	from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:465:in `const_missing'
	from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/inflector.rb:257:in `constantize'
	from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/core_ext/string/inflections.rb:148:in
`constantize'
	from /Library/Ruby/Gems/1.8/gems/railroad-0.5.0/lib/railroad/models_diagram.rb:27:in `generate'
	from /Library/Ruby/Gems/1.8/gems/railroad-0.5.0/lib/railroad/models_diagram.rb:26:in `each'
	from /Library/Ruby/Gems/1.8/gems/railroad-0.5.0/lib/railroad/models_diagram.rb:26:in `generate'
	from /Library/Ruby/Gems/1.8/gems/railroad-0.5.0/bin/railroad:47
	from /usr/bin/railroad:19:in `load'
	from /usr/bin/railroad:19

Plesae advise

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-11-17 20:48
Sender: Larry Kyrala

I also have this error.

% railroad -C
/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_supp
ort/dependencies.rb:279:in `load_missing_constant': uninitialized
constant AdminController (NameError)
        from /local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/li
b/active_support/dependencies.rb:468:in `const_missing'
        from /local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/li
b/active_support/dependencies.rb:480:in `const_missing'
        from /local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/li
b/active_support/inflector.rb:285:in `constantize'
        from /local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/li
b/active_support/inflector.rb:284:in `each'
        from /local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/li
b/active_support/inflector.rb:284:in `constantize'
        from /local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/li
b/active_support/core_ext/string/inflections.rb:143:in
`constantize'
        from /local/lib/ruby/gems/1.8/gems/railroad-0.5.0/lib/rai
lroad/controllers_diagram.rb:28:in `generate'
        from /local/lib/ruby/gems/1.8/gems/railroad-0.5.0/lib/rai
lroad/controllers_diagram.rb:24:in `each'
        from /local/lib/ruby/gems/1.8/gems/railroad-0.5.0/lib/rai
lroad/controllers_diagram.rb:24:in `generate'
        from /local/lib/ruby/gems/1.8/gems/railroad-0.5.0/bin/rai
lroad:47
        from /local/bin/railroad:19:in `load'
        from /local/bin/railroad:19
Date: 2008-10-24 11:04
Sender: C NICOLAOU

I am also facing the same problem on several apps

also the patch link below is not working.
Date: 2008-08-12 12:00
Sender: Tom Tuddenham

is Address an STI class? If so, I had this problem myself. The
hack that worked for me was to replace the extract_class_name
method in app_diagram.rb like so:

  # Extract class name from filename
  def extract_class_name(filename)
    # hack to support STI
    dir_name = File.basename(File.dirname(filename)).camelize
    module_name = ['Models', 'Controllers'].include?(dir_name)
? '' : dir_name + '::'
    module_name + File.basename(filename).chomp(".rb").
camelize
  end
Date: 2008-07-21 00:33
Sender: Darren Rush

Looks like this patch may resolve this issue:
http://rubyforge.org/tracker/index.php?func=detail&aid=20135&
amp;group_id=3383&atid=12998
Date: 2008-07-21 00:28
Sender: Darren Rush

I have the same error - happy to help repo. if needed.

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item