Forum: Ruby on Rails Routing error for application

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ramya (Guest)
on 2009-01-18 09:53
(Received via mailing list)
Hi,

I am to learning  Ruby on Rails with Rolling with Ruby on Rails
orilley handout.

I created an empty application by using rails command.

Then i created my own controller using the command.

ruby script \generate controller MyTest
This created a new controller file.

I used the port http://127.0.0.1:3000/My_Test after starting the rails
inbuilt server.

but i get the Routing Error.

No route matches "/My_Test/index" with {:method=>:get}

but when i just give the port alone it says Ruby on rails running in
your system.

I just followed the tutorial but couldnt get through this step.

http://www.onlamp.com/pub/a/onlamp/2005/01/20/rail...


Can anybody help me with this

Regards
Ramya
Teedub (Guest)
on 2009-01-18 16:59
(Received via mailing list)
Go into your "public" directory (in your project) and rename the
index.html to something else

Open config/routes and near the top add
"map.resources :my_tests"

Kill the process (control + c) and restart with script/server

That should do it
This topic is locked and can not be replied to.