# Simple: Routing error, no route matches

**URL:** <https://www.ruby-forum.com/t/simple-routing-error-no-route-matches/128356>\
**Category:** Rails\
**Created:** [February 7, 2008, 1:08am UTC](https://www.ruby-forum.com/t/simple-routing-error-no-route-matches/128356 "2008-02-07T01:08:25Z")\
**Posts on this page:** 3\
**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 7, 2008, 1:08am UTC](https://www.ruby-forum.com/t/simple-routing-error-no-route-matches/128356/1 "2008-02-07T01:08:25Z")

</div>

Hi,

I’m sure this is really simple and I’m missing something really  
obvious but maybe another pair of eyes could help. I’m getting this  
error:

Routing Error  
No route matches “/super\_admin/index.rhtml” with {:method=\>:get}

when I visit, [http://mydomain.com/super\_admin/index.rhtml](http://mydomain.com/super_admin/index.rhtml)

I have these files:

app/views/super\_admin/index.rhtml  
app/controllers/super\_admin\_controller.rb

Here’s the code in my super\_admin\_controller.rb file

class SuperAdminController \< ApplicationController  
def index  
end  
end

If it is useful, here is my config/routes.rb file.

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

map.connect ‘’, :controller =\> “register”, :action =\> “start”

map.resources :users  
map.resources :sessions  
map.signup ‘/signup’, :controller =\> ‘users’, :action =\> ‘new’  
map.login ‘/login’, :controller =\> ‘sessions’, :action =\> ‘new’  
map.logout ‘/logout’, :controller =\> ‘sessions’, :action =\>  
‘destroy’

# 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  
file====================================

Anyway, any insights are greatly appreciated, - Dave

---

<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 7, 2008, 1:21am UTC](https://www.ruby-forum.com/t/simple-routing-error-no-route-matches/128356/2 "2008-02-07T01:21:20Z")

</div>

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

> Hi,  
> Routing Error  
> No route matches “/super\_admin/index.rhtml” with {:method=\>:get}
> 
> when I visit,[http://mydomain.com/super\_admin/index.rhtml](http://mydomain.com/super_admin/index.rhtml)

Given the routes you have defined, you should wind up at the right  
controller/action if you visit [http://mydomain.com/super\_admin/index](http://mydomain.com/super_admin/index)  
(without the .html suffix).

---

<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 9, 2008, 11:15pm UTC](https://www.ruby-forum.com/t/simple-routing-error-no-route-matches/128356/3 "2008-02-09T23:15:11Z")

</div>

Yup, that worked. Thanks, -
