laredotornado-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org
2008-Feb-27 21:01 UTC
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=========================== --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 27 Feb 2008, at 21:01, laredotornado-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org wrote:> > 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> 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===========================> > > --~--~---------~--~----~------------~-------~--~----~ > 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, vis--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Feb 27, 4:01 pm, "laredotorn...-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org" <laredotorn...-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org> wrote:> 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 visitinghttp://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=========================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? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
laredotornado-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org
2008-Feb-28 16:41 UTC
Re: older version of rails -- Unknown action error
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 On Feb 27, 3:17 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 27 Feb 2008, at 21:01, laredotorn...-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org wrote: > > > > > > > > > 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 visitinghttp://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 > > > > > 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===========================> > > --~--~---------~--~----~------------~-------~--~----~ > > 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, vis- Hide quoted text - > > - Show quoted text -- Hide quoted text - > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 28 Feb 2008, at 16:41, laredotornado-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org wrote:> > 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> Best, - Dave > > On Feb 27, 3:17 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: >> On 27 Feb 2008, at 21:01, laredotorn...-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org wrote: >> >> >> >> >> >> >> >>> 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 visitinghttp://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 >> >> >> >>> 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===========================>> >>> >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 28 Feb 2008, at 16:41, laredotornado-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org wrote:> > 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> Best, - Dave > > On Feb 27, 3:17 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: >> On 27 Feb 2008, at 21:01, laredotorn...-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org wrote: >> >> >> >> >> >> >> >>> 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 visitinghttp://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 >> >> >> >>> 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===========================>> >>> >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
laredotornado-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org
2008-Feb-28 19:00 UTC
Re: older version of rails -- Unknown action error
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 On Feb 28, 11:26 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 28 Feb 2008, at 16:41, laredotorn...-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org wrote: > > > > > 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 > > > > > Best, - Dave > > > On Feb 27, 3:17 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > >> On 27 Feb 2008, at 21:01, laredotorn...-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org wrote: > > >>> 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 visitinghttp://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 > > >>> 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============================- Hide quoted text - > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 28 Feb 2008, at 19:00, laredotornado-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org wrote:> > 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> > > - Dave > > On Feb 28, 11:26 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: >> On 28 Feb 2008, at 16:41, laredotorn...-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org wrote: >> >> >> >>> 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 >> >> >> >>> Best, - Dave >> >>> On Feb 27, 3:17 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >>> wrote: >>>> On 27 Feb 2008, at 21:01, laredotorn...-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org wrote: >> >>>>> 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 visitinghttp://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 >> >>>>> 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============================- Hide quoted text - >> >> - Show quoted text - > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---