some more information
I ran the following function to search more detail:
#To show all the routes and their recognition
ActionController::Routing::Routes.routes.each do |route|
puts route
puts route.write_recognition
puts
end
And to my great surprise, despite exactly the same source, rails
version, ruby version, there was a difference:
In the "bad" server:
if (match = /\A\/(?i-:(rails_info|rails\/info|public|rest|admin|admin\/
teams|admin\/keywords|admin\/photos|admin\/car_situations|admin\/
circuits|admin\/statistics|admin\/update|admin\/communication|admin\/
users|admin\/dump|admin\/editor|admin\/photo_types|admin\/updates|admin
\/photo_styles|admin\/monitoring|admin\/database|admin\/jobs|admin\/
people|admin\/sponsors|admin\/sessions|admin\/import|admin\/customers|
admin\/synchronize|admin\/grand_prix|admin\/photo_angles|admin\/races|
admin\/posts|admin\/settings|admin\/emotions))(?:\/?\Z|\/([^\/;.,?]+)
(?:\/?\Z|\/([^\/;.,?]+)\/?))\Z/.match(path))
In the "good" servers:
if (match = /\A\/(?i-:(rails_info|rails\/info|public|admin\/teams|admin
\/keywords|admin\/photos|admin\/car_situations|admin\/circuits|admin\/
statistics|admin\/update|admin\/communication|admin\/users|admin\/dump|
admin\/editor|admin\/photo_types|admin\/updates|admin\/photo_styles|
admin\/jobs|admin\/monitoring|admin\/database|admin\/people|admin\/
sponsors|admin\/sessions|admin\/import|admin\/customers|admin\/
synchronize|admin\/grand_prix|admin\/photo_angles|admin\/races|admin\/
posts|admin\/settings|admin\/emotions|rest|admin))(?:\/?\Z|\/([^\/;.,?]
+)(?:\/?\Z|\/([^\/;.,?]+)\/?))\Z/.match(path))
In other word rest|admin is added on the non-working servers too
early...
"Sounds like a print the node before the subnodes"
Any hints would be lovely,
Paul Cahier
On Sep 17, 1:05 am, DeathWolf
<deathw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hello,
>
> I am experiencing a weird problem on one of the 3 test servers I''m
> using:
> There is a controller named admin/statistics and I am trying to
> access /admin/statistics
> The matching rule is: map.connect
'':controller/:action/:id''
> On 2 of the 3 servers, recognize_path correctly matches to
> Parameters: {"action"=>"index",
"controller"=>"admin/statistics"}
> But on the 3rd server here is what happens:
> Parameters: {"action"=>"statistics",
"controller"=>"admin"}
> Of course that action does not exist, and it fails.
>
> Any idea of what could be causing that problem?
>
> Thanks,
>
> Paul Cahier
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---