[Rails] 404 and NameError
jaikoo
jonathan at jaikoo.com
Wed Mar 2 11:36:41 GMT 2005
Hi guys,
I was wondering if anyone knew a fix for this problem I have. I've
ported one of the apps I work with to Rails 0.10.0 to use Routes.
Everything works great, except for 404 pages.
The thing is that if I give a non existent path, I get the correct 404
error page back. However if I request a non existent file such as
test.php (in fact anything non existent that isn't a path really), I get
a rails application error message on the screen and also a NameError in
the logs. I've tried catching NameError for non local IP's, but this
doesn't seem to get caught for some reason.
NameError (wrong constant name test.phpController):
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.0.0/lib/active_support/dep
endencies.rb:95:in `const_defined?'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.0.0/lib/active_support/dep
endencies.rb:95:in `const_available?'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.0/lib/action_controller/rou
ting.rb:138:in `eat_path_to_controller'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.0/lib/action_controller/rou
ting.rb:135:in `inject'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.0/lib/action_controller/rou
ting.rb:135:in `each'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.0/lib/action_controller/rou
ting.rb:135:in `inject'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.0/lib/action_controller/rou
ting.rb:135:in `eat_path_to_controller'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.0/lib/action_controller/rou
ting.rb:95:in `recognize'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.0/lib/action_controller/rou
ting.rb:89:in `each'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.0/lib/action_controller/rou
ting.rb:89:in `recognize'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.0/lib/action_controller/rou
ting.rb:250:in `recognize!'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.0/lib/action_controller/rou
ting.rb:249:in `each'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.0/lib/action_controller/rou
ting.rb:202:in `each'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.0/lib/action_controller/rou
ting.rb:202:in `each'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.5.0/lib/action_controller/rou
ting.rb:249:in `recognize!'
/usr/local/lib/ruby/gems/1.8/gems/rails-0.10.0/lib/dispatcher.rb:32:in `disp
atch'
Any help would be much appreciated:)
Cheers
J
More information about the Rails
mailing list