# Older version of rails -- Unknown action error

**URL:** <https://www.ruby-forum.com/t/older-version-of-rails-unknown-action-error/130386>\
**Category:** Rails\
**Created:** [February 27, 2008, 10:01pm UTC](https://www.ruby-forum.com/t/older-version-of-rails-unknown-action-error/130386 "2008-02-27T22:01:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 27, 2008, 10:01pm UTC](https://www.ruby-forum.com/t/older-version-of-rails-unknown-action-error/130386/1 "2008-02-27T22:01:42Z")

</div>

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](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============================

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 27, 2008, 10:18pm UTC](https://www.ruby-forum.com/t/older-version-of-rails-unknown-action-error/130386/2 "2008-02-27T22:18:46Z")

</div>

On Feb 27, 4:01 pm, “removed\_email\_address@domain.invalid”  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have these files:  
> As always, your help is greatly appreciated, - Dave  
> ‘user’, :action =\> ‘change\_password’
> 
> # map.connect ‘products/:id’, :controller =\> ‘catalog’, :action =\>
> 
> # – just remember to delete public/index.html.
> 
> =========================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?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 27, 2008, 10:25pm UTC](https://www.ruby-forum.com/t/older-version-of-rails-unknown-action-error/130386/3 "2008-02-27T22:25:13Z")

</div>

On 27 Feb 2008, at 21:01, removed\_email\_address@domain.invalid wrote:

> 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

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 28, 2008, 5:41pm UTC](https://www.ruby-forum.com/t/older-version-of-rails-unknown-action-error/130386/4 "2008-02-28T17:41:49Z")

</div>

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 C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 28, 2008, 7:30pm UTC](https://www.ruby-forum.com/t/older-version-of-rails-unknown-action-error/130386/5 "2008-02-28T19:30:58Z")

</div>

On 28 Feb 2008, at 16:41, removed\_email\_address@domain.invalid wrote:

> 

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

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 28, 2008, 6:51pm UTC](https://www.ruby-forum.com/t/older-version-of-rails-unknown-action-error/130386/6 "2008-02-28T18:51:47Z")

</div>

On 28 Feb 2008, at 16:41, removed\_email\_address@domain.invalid 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

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 28, 2008, 8:01pm UTC](https://www.ruby-forum.com/t/older-version-of-rails-unknown-action-error/130386/7 "2008-02-28T20:01:16Z")

</div>

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 C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 29, 2008, 11:08am UTC](https://www.ruby-forum.com/t/older-version-of-rails-unknown-action-error/130386/8 "2008-02-29T11:08:38Z")

</div>

On 28 Feb 2008, at 19:00, removed\_email\_address@domain.invalid 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
