在rails上的ruby教程时出错

时间:2014-01-03 02:55:39

标签: ruby-on-rails

当我使用http://arubystory.blogspot.gr/2013/11/tutorial-saying-hello-world-with-ruby.html中的教程研究ruby on rails Apter我将以下行root to: 'pages#home'添加到文件config/routes.rb,但它没有在浏览器中显示页面hello world,它显示。

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"

谢谢

1 个答案:

答案 0 :(得分:0)

您的页面文件夹中名为home的模板文件丢失了。该路线指的是 pages_controller.rb 中的主页操作以及名为 home.html.erb

的html文件

在app / views / pages中创建home.html.erb。