older version of rails -- Unknown action error

Hi,

I'm using Rails 1.2.3 (constraint of the hosting company). I'm
getting this error

Unknown action
No action responded to subscriber

upon visiting http://mydomain.com/super_admin/subscriber/search

I have these files:

app/controllers/super_admin_controller.rb
app/controllers/super_admin/subscriber_controller.rb
app/views/super_admin/subscriber/search.rhtml

and below is my routes.rb file. I had to comment out the
"map.namespace :super_admin do |adm|" because when I included it, I
got an 'Application error Rails application failed to start properly"'
error.

As always, your help is greatly appreciated, - Dave

================Begin config/routes.rb=======================
ActionController::Routing::Routes.draw do |map|

  map.connect '', :controller => "register", :action => "start"

  map.resources :users
  map.login '/login', :controller => 'user', :action => 'login'
  map.logout '/logout', :controller => 'user', :action => 'logout'
  map.change_password '/change_password', :controller =>
'user', :action => 'change_password'

  #map.namespace :super_admin do |adm|
  # adm.resources :subscriber, :collection => { :search
=> :get, :searchresults => :get }
  #end

  # The priority is based upon order of creation: first created ->
highest priority.

  # Sample of regular route:
  # map.connect 'products/:id', :controller => 'catalog', :action =>
'view'
  # Keep in mind you can assign values other than :controller
and :action

  # Sample of named route:
  # map.purchase 'products/:id/purchase', :controller =>
'catalog', :action => 'purchase'
  # This route can be invoked with purchase_url(:id => product.id)

  # You can have the root of your site routed by hooking up ''
  # -- just remember to delete public/index.html.
  # map.connect '', :controller => "welcome"

  # Allow downloading Web Service WSDL as a file with an extension
  # instead of a file named 'wsdl'
  map.connect ':controller/service.wsdl', :action => 'wsdl'

  # Install the default route as the lowest priority.
  map.connect ':controller/:action/:id.:format'
  map.connect ':controller/:action/:id'
end
=========================end config/
routes.rb============================

Hi,

I'm using Rails 1.2.3 (constraint of the hosting company). I'm
getting this error

Unknown action
No action responded to subscriber

upon visiting http://mydomain.com/super_admin/subscriber/search

I have these files:

app/controllers/super_admin_controller.rb
app/controllers/super_admin/subscriber_controller.rb
app/views/super_admin/subscriber/search.rhtml

wel it looks like rails is assuming that
super_admin/subscriber/search
means super_admin controller, subscriber action, id = search
instead of super_admin module, subscriber controller, search action, no id
(which is fair enough - the 2 do have the same path)
You could probably help rails by disambiguating the routes, ie stick a map statement that will explicity map that url to the right controller.

Fred

Just a hunch but you probably don't have a method in your
super_admin_controller.rb named subscriber. I see that second
controller you wrote was app/controllers/super_admin/
subscriber_controller.rb . You don't really believe that, that url
goes to that second controller do you?

Thanks, Fred. I added this line

  map.connect '/super_admin/subscriber/search', :controller =>
"super_admin/subscriber", :action => "search"

and it worked. But I have a follow up question. Do I have to add a
line to routes.rb for each action in the subscriber controller? Is
there a way I can write a single line to encompass all actions? Keep
in mind I'm working with that older version of Rails, 1.2.3.

Best, - Dave

Thanks, Fred. I added this line

map.connect '/super_admin/subscriber/search', :controller =>
"super_admin/subscriber", :action => "search"

and it worked. But I have a follow up question. Do I have to add a
line to routes.rb for each action in the subscriber controller? Is
there a way I can write a single line to encompass all actions? Keep
in mind I'm working with that older version of Rails, 1.2.3.

Just off the top of my head:

map.connect '/super_admin/subscriber/:action/:id', :controller =>
"super_admin/subscriber"

Fred

Thanks, Fred. I added this line

map.connect '/super_admin/subscriber/search', :controller =>
"super_admin/subscriber", :action => "search"

and it worked. But I have a follow up question. Do I have to add a
line to routes.rb for each action in the subscriber controller? Is
there a way I can write a single line to encompass all actions? Keep
in mind I'm working with that older version of Rails, 1.2.3.

Oh, you do know that if you freeze the rails gems in to vendor you can
run any version of rails you want, regardless of what gems the hosting
company has installed ?

Fred

Thanks, the previous command worked. Also, on the freezing, I knew
you could freeze backwards, but can you freeze forwards? If they're
running 1.2.3 and I have 2.0.2 on my dev environment, can I make that
work?

- Dave

Thanks, the previous command worked. Also, on the freezing, I knew
you could freeze backwards, but can you freeze forwards? If they're
running 1.2.3 and I have 2.0.2 on my dev environment, can I make that
work?

The whole point of freezing is that instead of loading rails from gems
you load it from /vendor.
The host doesn't even need to have rails installed, the version of
their gems is completely irrelevant.

Fred