Routing Problem

Hi, I have the following route setup

map.auth ‘users/auth/:action/:id’,
:controller => ‘users/auth’, :action => nil, :id => nil

map.authadmin ‘users/authadmin/:action/:id’,
:controller => ‘users/authadmin’, :action => nil, :id => nil

Allow downloading Web Service WSDL as a file with an extension

instead of a file named ‘wsdl’

map.connect ‘:controller/service.wsdl’, :action => ‘wsdl’
map.admin ‘admin/:controller/:action/:id’, :module => ‘admin’
map.file_upload ‘file_uploader/:controller/:action/:id’, :module =>

map.connect ‘:lang/:controller/:action/:id’

Install the default route as the lowest priority.

map.connect ‘:controller/:action/:id’, :lang => ‘de’

map.index ‘’, :lang => ‘de’, :controller => ‘employees’

and the following problem:

This works like a charm on my development system, but has an error on my
production system (textdrive). It should recognize
‘my_host/admin/employees’ as a route to Admin::EmployeesController and
‘my_host/employees’ as one to EmployeesController. The above code
usually works.

On Textdrive, this first route gets recognized as a route to
EmployeesController with params {:lang => ‘admin’, :controller =>
‘employees’}, although map.admin is defined first. map.auth an
map.file_upload both work fine. Rails is found in vendor and is thus the
same version on both systems. Does anyone have an idea what could cause
this behaviour?

P.S.: If you wonder about :module, this is a small hack to make it
possible to force a module:

module ActionController
module Routing
class RouteSet
def recognize(request)
params = recognize_path(request.path,
request.path_parameters = params.with_indifferent_access

    controller = [params[:module],




P.P.S.: Please, I don’t want to discuss whether or not to use
controllers in modules.

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