SitePoint Sponsor

User Tag List

Results 1 to 1 of 1

Threaded View

  1. #1
    SitePoint Zealot
    Join Date
    Jul 2004
    Location
    Tacoma, WA
    Posts
    178
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb "No route matches..." with {:method => :get} error

    This is a bit frustrating. A while back ago I ran into this same error and I restarted my webrick server and it worked fine. This time I ran into this error and again I tried to restart my webrick server thinking that this would be the fix and it's not. I can't understand why I'm getting this error again.

    My setup is I generated a controller called author. I generated my controller this way:
    ruby script/server generate controller 'admin/author'

    The exact error is:
    No route matches "/admin/" with {:method=>:get}
    Here's my routes file:
    Code:
    ActionController::Routing::Routes.draw do |map|
      map.connect 'admin/:controller/:action/:id'
      map.connect 'admin/:controller/:action/:id.:format'
    
      map.connect ':controller/:action/:id'
      map.connect ':controller/:action/:id.:format'
    end
    My url looks like this: http://localhost:3000/admin/ I also tried http://localhost:3000/admin/index and still nothing works. I restarted my the server several times and I'm still getting this error. Is anyone else dealing with this?


    UPDATED:
    I solved this by deleting the index.html file in the public folder. Dang what a noob!
    Last edited by t3projects; Mar 21, 2008 at 12:58. Reason: Solved


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
  •