SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Sep 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Lenz Book - p. 138 - 'http://localhost:3000/story' cant be found

    Hi together

    I am new to Ruby, used to write some PHP, and I am working at the moment with Patrick Lenz's book but I am stuck at page 138.

    On page 138 he says that you should be able to type 'http://localhost:3000/story in your webbrowser and it should display something like "Story#index..."

    But my browser cant even find the file. And in the webrick console it says "ERROR /story' not found."

    Sounds quite obvious, but the file is there! I redid all the steps now like 3 times but I just cant find the problem. I think the problem is in the "routes.rb" file but Lenz doesnt say you have to modify it in any way.

    I created the story controller, I have data in my database, I have a Story model, so why doesnt it work?! :/

    I get the "getting started" thingy when I open localhost:3000 so the webrick server works, the MySQL server works too since I could migrate the date from the console.

    I am really confused guys


    Thanks for you answers,
    Stefano

  2. #2
    SitePoint Enthusiast
    Join Date
    Nov 2005
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stefano_1990 View Post
    Hi together

    I am new to Ruby, used to write some PHP, and I am working at the moment with Patrick Lenz's book but I am stuck at page 138.

    On page 138 he says that you should be able to type 'http://localhost:3000/story in your webbrowser and it should display something like "Story#index..."

    But my browser cant even find the file. And in the webrick console it says "ERROR /story' not found."

    Sounds quite obvious, but the file is there! I redid all the steps now like 3 times but I just cant find the problem. I think the problem is in the "routes.rb" file but Lenz doesnt say you have to modify it in any way.

    I created the story controller, I have data in my database, I have a Story model, so why doesnt it work?! :/

    I get the "getting started" thingy when I open localhost:3000 so the webrick server works, the MySQL server works too since I could migrate the date from the console.

    I am really confused guys


    Thanks for you answers,
    Stefano
    Did you follow every step or did you skim through the examples?

    A lot of things could be wrong here. Could you provide us with the contents of your story_controller file? And also your story view file?


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
  •