当我在http://arubystory.blogspot.gr/2013/11/tutorial-saying-hello-world-with-ruby.html Apter教程中学习rails时,我添加了下面的行root to: 'pages#home'来文件config/routes.rb,但是它不会在浏览器中显示页面hello,它会显示。
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"谢谢
发布于 2014-01-03 03:09:50
您的模板文件“页面文件夹中的主页”丢失了。该路由引用pages_controller.rb中的action home以及名为home.html.erb的html文件。
在应用程序/视图/页面中创建home.html.erb。
https://stackoverflow.com/questions/20895748
复制相似问题