前提・実現したいこと
「ruby on rails5 超入門」という参考書の中に、ユーザー側からデータを入力してもらうためのフォームを作成するチャプターがあります。
そこで下記のようなエラーがでて、原因がわかりません...。
http://localhost:3000/helo/index にアクセスし正しくページが表示されるようにしたいです。
発生している問題・エラーメッセージ
Routing Error
No route matches [GET] "/helo/index"
Rails.root: c:/Users/user/Desktop/RailsApp
Application Trace | Framework Trace | Full Trace
Routes
Routes match in priority from top to bottom
/* 以下パス */
helo_path POST /helo(.:format)
helo#index
helo_index_path POST /helo/index(.:format)
helo#index
rails_service_blob_path GET /rails/active_storage/blobs/:signed_id/*filename(.:format)
active_storage/blobs#show
rails_blob_representation_path GET /rails/active_storage/representations/:signed_blob_id/:variation_key/*filename(.:format)
active_storage/representations#show
rails_disk_service_path GET /rails/active_storage/disk/:encoded_key/*filename(.:format)
active_storage/disk#show
update_rails_disk_service_path PUT /rails/active_storage/disk/:encoded_token(.:format)
active_storage/disk#update
rails_direct_uploads_path POST /rails/active_storage/direct_uploads(.:format)
active_storage/direct_uploads#create
該当のソースコード
RailsApp\app\views\helo\index.html.erb
<h1><%= @title %></h1>
<p><%= @msg %></p>
<form method="POST" action="/helo/index">
<input type="text" name="input1" value="<%= @value %>">
<input type="submit">
②参考書ヘルプサイトのサンプルをDLしてもってきましたが同じエラーになりました。
補足情報(FW/ツールのバージョンなど)
Ruby ver: 2.4.4.2
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/08/29 21:43