작동하지 : root "pages#index"
루트 경로가 routes.rb 파일에서
pages_controller.rb 파일
class PagesController < ApplicationController
def index
render 'home'
end
def about
end
end
보기 이름 home.html.haml
rake routes
반환
Prefix Verb URI Pattern Controller#Action
home GET /home(.:format) pages#home
about GET /about(.:format) pages#about
은 우리가 "라는 로컬 호스트 미안해,하지만 뭔가가 나왔어. 룽. "콘솔 말한다 레일에 ActionController::RoutingError (No route matches [GET] "/home"):
4.2.0.beta2
* 레일 버전
무엇이 오류입니까? – Nithin
어떤 버전의 레일? – JTG
@nithin localhost는 "죄송합니다.하지만 문제가 발생했습니다."라고 말하면 콘솔에는 ActionController :: RoutingError (경로가 [GET] "/ home"과 일치하지 않습니다.)라고 표시되어 있습니다 : – Jadam