0

このサイトを参考に(??)設定しようとしたら、ルートインデックスをshowに設定するまで成功しました"hello Rails"。そのチュートリアルでは、ファイルを次のroutes.rbように変更する必要があります。

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

それでもうまくいきません。誰でも私を助けることができますか?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 に答える