これら 2 つのコマンドの間:
root to: 'static_pages#home'
#get 'static_pages/home'
最初のものを使用すると、次のエラーが発生します。
No route matches [GET] "/static_pages/home.html"
Rails.root: /Users/Jony/RubymineProjects/sample_app
アクセスするためhttp://localhost:3000/static_pages/home.html
しかし、2番目のものを使用すると、うまく機能します。
違いは何ですか?最初のスタイルのルーティングを使用するように修正するにはどうすればよいですか?