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


I am Noddy, I am new to ROR :slight_smile:
I am reading this fantastic book simply rails 2 and in chapter 5 when I finally created modle, controller and view when I am running the script I am getting this error
Routing Error
No route matches “/shovell/index” with {:method=>:get}

I have gone through with the forum and found nothing for this, please help me ASAP.

My controller code is something like this.

class StoriesController < ApplicationController
  def index


Please let me know what I am doing wrong, I have also deleted the index file from public folder but nothing changed.

Thanks in advance.

Index always maps to the default route for the controller. That is, to get to the method ‘index’, the path is “shovell/”. No action name.

What does your routes.rb file look like? It should have a line that looks like this:

map.resources :stories

Which would produce a url of: http://localhost:3000/stories