how to specify controller '/admin/foo'

WeBrick handles the link correctly on development, but apache in
production does not:

<%= link_to "Orders", :controller => '/admin/orders', :action => 'index' %>

The controller lives in ./app/controllers/admin/orders_controller.rb

From the production log, apache is looking for the "orders" action in
"./app/controllers/admin_controller.rb" and not finding it.

-- log message on production --

Processing AdminController#orders (for 209.11.127.13 at 2008-06-05
14:19:19) [GET]
  Session ID: 24e7a44689df1c85a911492e0d581985
  Parameters: {"action"=>"orders", "controller"=>"admin"}

Anthony Ettinger wrote:

WeBrick handles the link correctly on development, but apache in
production does not:

<%= link_to "Orders", :controller => '/admin/orders', :action => 'index' %>

The controller lives in ./app/controllers/admin/orders_controller.rb

I suspect you either can't or don't want to put sub-folders among the controllers.

Just write an app/controllers/orders_controller.rb

if you need the URI /admin/orders/index, then write a named route into your routes.rb file.

have you tried " :controller => 'admin/orders' "?

While it is possible to nest your controllers, I have found that this
leads to more trouble than it is worth.

Have you considered having your orders controller at the top level,
and simply having some form of security?

Also, if the above does not work--are you using default routes, or
something else? If something else can we have a peek?

<%= link_to "Orders", :controller => 'admin/orders', :action => 'index'
%>
Try this