나는 레일에 처음 MVC를 만들 비계를 사용하여 3.1레일 : 왜 내 첫 페이지가 표시되지 않습니까? (라우팅 오류)
rails generate scaffold Post name:string title:string content:text
내가
설정 코드를 다음 추가 된 다음 공공/index.html을 파일을 삭제
/routes.rb
root :to => 'post#index'
하지만 rails s
의와 서버를 시작할 때 오류는 다음과 같습니다.
ActionController::RoutingError (uninitialized constant PostController):
왜? posts/index.html.erb
을 렌더링하지 않지만 오류가 발생하는 이유는 무엇입니까?
해결되었습니다. 그것은 내 오타입니다, 게시물 # index –