首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在ruby on rails中使用教程时出错

在ruby on rails中使用教程时出错
EN

Stack Overflow用户
提问于 2014-01-03 02:55:38
回答 1查看 330关注 0票数 0

当我在http://arubystory.blogspot.gr/2013/11/tutorial-saying-hello-world-with-ruby.html Apter教程中学习rails时,我添加了下面的行root to: 'pages#home'来文件config/routes.rb,但是它不会在浏览器中显示页面hello,它会显示。

代码语言:javascript
复制
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"

谢谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-01-03 03:09:50

您的模板文件“页面文件夹中的主页”丢失了。该路由引用pages_controller.rb中的action home以及名为home.html.erb的html文件。

在应用程序/视图/页面中创建home.html.erb。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20895748

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档