Routing Error during “Ruby on Rails-Tutorial”

后端 未结 9 1957
忘了有多久
忘了有多久 2021-01-24 03:25

It seems like some people here had this problem but I couldn\'t find any solution in another topic.

I am doing Chapter 3 of the Ruby on Rails-Tutorial, working on the sta

相关标签:
9条回答
  • 2021-01-24 04:07

    check your http:// address, specifically if you are on localhost:3000/path or localhost:3000/path1/path2, etc

    0 讨论(0)
  • 2021-01-24 04:09

    Once you change the format of your mapping from get to match you will not need static_pages anymore, just go straight to localhost:3000/pagename e.g localhost:3000/about

    0 讨论(0)
  • 2021-01-24 04:13

    Try this :

    match "/static_pages/home" => "static_pages#home", :via => :get
    match "/static_pages/help" => "static_pages#help", :via => :get
    match "/static_pages/about" => "static_pages#about", :via => :get
    

    Add into routes , restart the server and refresh browser .

    0 讨论(0)
提交回复
热议问题