SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2009
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

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

    Hi,

    I am Noddy, I am new to ROR
    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.
    Code:
    class StoriesController < ApplicationController
      def index
      end
    
    end
    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.
    Noddy

  2. #2
    SitePoint Zealot
    Join Date
    Feb 2003
    Location
    Akron, OH, USA
    Posts
    102
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    What does your routes.rb file look like? It should have a line that looks like this:
    Code:
    map.resources :stories
    Which would produce a url of: http://localhost:3000/stories

  3. #3
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vaibhavcoder View Post
    Hi,
    No route matches "/shovell/index" with {:method=>:get}
    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.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •