I''ve got an application that works fine when run on Brick, but which
throws a routing problem when deployed to apache/fastcgi.
Both servers are running rails 1.2.2
The problem happens with simple links. I''ve got a link_to tag like
this:
<%= link_to "Categories", :controller =>
"/admin/factory/
category", :action => "list" %>
There is indeed a /admin/factory/category controller, and there is a
''list'' action. The link works fine with Brick.
However, clicking on the link on the Apache production server gives
this error in the production.log
==> current/log/production.log <=
Processing ApplicationController#index (for 24.46.207.128 at
2007-02-11 15:58:16) [GET]
Session ID: ec28effb4fea482174d1e3ccdb2bba08
Parameters: {}
ActionController::RoutingError (no route found to match "/admin/
factory/category/list" with {:method=>:get}):
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
action_controller/routing.rb:1292:in `recognize_path''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
action_controller/routing.rb:1282:in `recognize''
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/dispatcher.rb:
40:in `dispatch''
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/fcgi_handler.rb:
168:in `process_request''
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/fcgi_handler.rb:
143:in `process_each_request!''
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/fcgi_handler.rb:
109:in `with_signal_handler''
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/fcgi_handler.rb:
142:in `process_each_request!''
/usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:600:in `each_cgi''
/usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each''
/usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi''
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/fcgi_handler.rb:
141:in `process_each_request!''
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/fcgi_handler.rb:
55:in `process!''
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/fcgi_handler.rb:
25:in `process!''
/home/mrs/public/dispatch.fcgi:24
However, when I try to exercise the same route using console, also on
the production server, there''s no problem:
root@secure [/home/mrs/current]# ruby script/console
Loading production environment.>> rs = ActionController::Routing::Routes
=> #<ActionController::Routing::RouteSet:0xb7c22ad8
@routes=[#<ActionController::Routing::Route:0xb774441c
?> puts rs.routes
ANY /fckeditor/check_spelling/
{:action=>"check_spelling", :controller=>"fckeditor"}
ANY /fckeditor/command/
{:action=>"command", :controller=>"fckeditor"}
ANY /fckeditor/upload/
{:action=>"upload", :controller=>"fckeditor"}
ANY /
{:action=>"list", :controller=>"admin/factory/item"}
ANY /:controller/service.wsdl/ {:action=>"wsdl"}
ANY /:controller/:action/:id/ {}
=> nil
>> rs.recognize_path "/admin/factory/category/list"
=> {:action=>"list",
:controller=>"admin/factory/category"}
I''ve been struggling with this for a couple days, but can''t
figure it
out. Any suggestions greatly appreciated.
Thanks: John
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---