简体   繁体   中英

Error when to tutorial in ruby on rails

When i study ruby on rails with tutorial in http://arubystory.blogspot.gr/2013/11/tutorial-saying-hello-world-with-ruby.html Apter i add the following line root to: 'pages#home' to file config/routes.rb but it don't show page hello world in browser, it show.

Template is missing
Missing template pages/home, application/home with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee]}. Searched in: * "C:/Users/Thang/tutorials/hello_world/app/views"

Thank you

Your template file called home inside the pages folder is missing. The route is referring to the action home in the pages_controller.rb aswell as the html file called home.html.erb

Create home.html.erb in app/views/pages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM