tzenes
tzenes

Reputation: 1709

No routes found

I recently upgrade to Rails 3, and after fixing most of the issues I have my server running. However, I amgetting a rather usual error:

Started GET "/" for 10.0.0.1 at Sat May 14 00:37:26 +0000 2011                                                                                                                                                                         

ActionController::RoutingError (No route matches "/"): 

when I try to visit http://localhost:9292/

for reference I'm running my server via rackup.

If I look in my routes.rb file, I see:

RailsRoot::Application.routes do 
    # ...
    match '/', :to => "application#show"                                                                                                                                                                                                             
    root :to => 'application#show' 
    # ...
end

For reference application is a controller and it does have an action show, and my application is named RailsRoot.

Given that I believe I've constructed my routes correctly it seems likely that I've installed something wrong or something went wrong in the upgrade, but I'm not sure where seeing as almost everything else is working.

Does anyone know why this might be?

Upvotes: 1

Views: 289

Answers (1)

Jonathan Tran
Jonathan Tran

Reputation: 15306

In your routes.rb, change this line

RailsRoot::Application.routes do

to this

RailsRoot::Application.routes.draw do

Upvotes: 1

Related Questions