RoutingError -- but only for one controller

This one has had me stumped all morning, so any ideas would be a big
help. I’m getting the following error for any request to one of my
controllers, ‘client’:

ActionController::RoutingError (Recognition failed for “/client/new”):
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:488:in
recognition_failed' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:478:inrecognize!’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in
dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:150:inprocess_request’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:54:in
process!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:53:ineach_cgi’
/usr/lib/ruby/1.8/fcgi.rb:597:in each' /usr/lib/ruby/1.8/fcgi.rb:597:ineach_cgi’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:53:in
process!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:23:inprocess!’
dispatch.fcgi:34

Here are the weird parts:

  1. The error only happens when I’m in my production environment.
    Everything’s fine in development.
  2. Even in production mode, the other two controllers in my app work
    perfectly. Plus, I haven’t touched anything in config or dispatch.fcgi.
    So I don’t think it’s an Apache or fastcgi problem.

The last thing I did prior to the problem was to add a new action to my
client_controller and add the corresponding view.

Thanks in advance for any hints in the right direction.

A

Upon further experimentation:

The client controller sometimes works, as long as I’m not hitting the
page too fast – but two refreshes right in a row will cause the
RoutingError. Here’s what the log looks like:

Processing ClientController#new (for 130.64.17.100 at 2006-07-19
07:21:02) [GET]
Session ID: 7bf53458daa10f2b2459c655409ce252
Parameters: {“action”=>“new”, “controller”=>“client”}
Rendering client/new
Completed in 0.04610 (21 reqs/sec) | Rendering: 0.04497 (97%) | DB:
0.00000 (0%) | 200 OK [http://jm2.tuftsphoto.com/client/new]

Processing Base#index (for 130.64.17.100 at 2006-07-19 07:21:05) [GET]
Session ID: 7bf53458daa10f2b2459c655409ce252
Parameters: {}

ActionController::RoutingError (Recognition failed for “/client/new”):
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:488:in
recognition_failed' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:478:inrecognize!’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in
dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:150:inprocess_request’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:54:in
process!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:53:ineach_cgi’
/usr/lib/ruby/1.8/fcgi.rb:597:in each' /usr/lib/ruby/1.8/fcgi.rb:597:ineach_cgi’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:53:in
process!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:23:inprocess!’
dispatch.fcgi:34

The HTTP request was exactly the same (I just pressed refresh) but the
second one has no parameters and causes the error. Any ideas? Thanks,

Aaron wrote:

This one has had me stumped all morning, so any ideas would be a big
help. I’m getting the following error for any request to one of my
controllers, ‘client’:

ActionController::RoutingError (Recognition failed for “/client/new”):
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:488:in
recognition_failed' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:478:inrecognize!’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in
dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:150:inprocess_request’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:54:in
process!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:53:ineach_cgi’
/usr/lib/ruby/1.8/fcgi.rb:597:in each' /usr/lib/ruby/1.8/fcgi.rb:597:ineach_cgi’
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:53:in
process!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:23:inprocess!’
dispatch.fcgi:34

Here are the weird parts:

  1. The error only happens when I’m in my production environment.
    Everything’s fine in development.
  2. Even in production mode, the other two controllers in my app work
    perfectly. Plus, I haven’t touched anything in config or dispatch.fcgi.
    So I don’t think it’s an Apache or fastcgi problem.

The last thing I did prior to the problem was to add a new action to my
client_controller and add the corresponding view.

Thanks in advance for any hints in the right direction.

A

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs