0

I am trying to set (??), following this site, and I succeeded up to setting root index to show "hello Rails". In that tutorial, the file routes.rb must be changed to:

Blog::Application.routes.draw do
  get "welcome/index"

  # The priority is based upon order of creation:
  # first created -> highest priority.
  # ...
  # You can have the root of your site routed with "root"
   root to: "welcome#index"  #I just make this uncomment to set my hello rails show on index

 end

but it still does not work. Can anyone help me? I Use windows 7.

4

2 回答 2

8

您需要删除以下静态文件:

public/index.html

Rails 附带了一组提供开箱即用的基本功能的静态文件。在 index.html 的情况下,它是加载根路径时默认显示的内容。在它被删除之前,它将继续覆盖您的根路由。

于 2013-07-16T04:37:04.957 回答
1

你必须删除public/index.html

于 2013-07-16T04:37:47.317 回答