###前提・実現したいこと
ルーティングエラーを解消したい。
ルーティングの情報を記述しても治らない。
###発生している問題・エラーメッセージ
localhost:3000/helloにアクセスすると....
Routing Error No route matches [GET] "/hello"
/hello/index にアクセスしたときも同じようなエラーが発生します。
###該当のソースコード
Ruby
1[hello_controller.rb] 2class HelloController < ApplicationController 3 def index 4 render plain:"Hello, This is Rails sample page!" 5 end 6end
ruby
1[routes.rb] 2RailsApp::Application.routes.draw do 3 get 'hello/index' 4 get 'hello', to: 'hello#index' 5end 6
###試したこと
色々調べてみましたが初心者につきわからなかったです...
###環境
Rails version: 5.0.1
Ruby version: 2.3.1 (x86_64-linux)
※ただしWindows 10のBash on Ubuntu on Windowsを利用しています
回答2件
あなたの回答
tips
プレビュー