質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.35%
Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

0回答

502閲覧

rails routes エラー文

dsfas

総合スコア18

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

0クリップ

投稿2020/04/10 14:39

以下の文で最後にroutesのチェックとのことですが、
routeをどこにもっていけばよいかわからなく困っています。
ご回答いただければ幸いです。

Traceback (most recent call last):
59: from bin/rails:4:in <main>' 58: from bin/rails:4:in require'
57: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/commands.rb:18:in <top (required)>' 56: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/command.rb:46:in invoke'
55: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/command/base.rb:69:in perform' 54: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in dispatch'
53: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in invoke_command' 52: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in run'
51: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/commands/routes/routes_command.rb:13:in perform' 50: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/command/actions.rb:15:in require_application_and_environment!'
49: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/command/actions.rb:28:in require_environment!' 48: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/application.rb:339:in require_environment!'
47: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in require' 46: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:291:in load_dependency'
45: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in block in require' 44: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in require'
43: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in require' 42: from C:/Sites/blog/config/environment.rb:5:in <top (required)>'
41: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/application.rb:363:in initialize!' 40: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:60:in run_initializers'
39: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:205:in tsort_each' 38: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:226:in tsort_each'
37: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:347:in each_strongly_connected_component' 36: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:347:in call'
35: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:347:in each' 34: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:349:in block in each_strongly_connected_component'
33: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:431:in each_strongly_connected_component_from' 32: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component'
31: from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:228:in block in tsort_each' 30: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:61:in block in run_initializers'
29: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:32:in run' 28: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/initializable.rb:32:in instance_exec'
27: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/application/finisher.rb:184:in block in <module:Finisher>' 26: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/application/routes_reloader.rb:10:in execute'
25: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.2.2/lib/active_support/file_update_checker.rb:83:in execute' 24: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/application/routes_reloader.rb:30:in block in updater'
23: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/application/routes_reloader.rb:20:in reload!' 22: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/application/routes_reloader.rb:41:in load_paths'
21: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/application/routes_reloader.rb:41:in each' 20: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/application/routes_reloader.rb:41:in block in load_paths'
19: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.2.2/lib/rails/application/routes_reloader.rb:41:in load' 18: from C:/Sites/blog/config/routes.rb:1:in <top (required)>'
17: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actionpack-6.0.2.2/lib/action_dispatch/routing/route_set.rb:411:in draw' 16: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actionpack-6.0.2.2/lib/action_dispatch/routing/route_set.rb:429:in eval_block'
15: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actionpack-6.0.2.2/lib/action_dispatch/routing/route_set.rb:429:in instance_exec' 14: from C:/Sites/blog/config/routes.rb:2:in block in <top (required)>'
13: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actionpack-6.0.2.2/lib/action_dispatch/routing/mapper.rb:712:in get' 12: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actionpack-6.0.2.2/lib/action_dispatch/routing/mapper.rb:751:in map_method'
11: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actionpack-6.0.2.2/lib/action_dispatch/routing/mapper.rb:1633:in match' 10: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actionpack-6.0.2.2/lib/action_dispatch/routing/mapper.rb:1886:in map_match'
9: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actionpack-6.0.2.2/lib/action_dispatch/routing/mapper.rb:1886:in each' 8: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actionpack-6.0.2.2/lib/action_dispatch/routing/mapper.rb:1892:in block in map_match'
7: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actionpack-6.0.2.2/lib/action_dispatch/routing/mapper.rb:1928:in decomposed_match' 6: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actionpack-6.0.2.2/lib/action_dispatch/routing/mapper.rb:1956:in add_route'
5: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actionpack-6.0.2.2/lib/action_dispatch/routing/mapper.rb:83:in build' 4: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actionpack-6.0.2.2/lib/action_dispatch/routing/mapper.rb:83:in new'
3: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actionpack-6.0.2.2/lib/action_dispatch/routing/mapper.rb:131:in initialize' 2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actionpack-6.0.2.2/lib/action_dispatch/routing/mapper.rb:262:in normalize_options!'
1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actionpack-6.0.2.2/lib/action_dispatch/routing/mapper.rb:317:in check_controller_and_action' C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/actionpack-6.0.2.2/lib/action_dispatch/routing/mapper.rb:337:in check_part': Missing :controller key on routes definition, please check your routes. (ArgumentError)

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

maisumakun

2020/04/10 23:02

どのようなルーティングを書きましたか?
dsfas

2020/04/10 23:55

すみません、そのルーティングというものがよくわかっていないのですが Rails.application.routes.draw do get 'welcome#index' resources :articles root 'welcomeindex' # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html end このようなプログラムを書いて、 ここからターミナルのresourcesのarticlesを読み込みたいのですが、 エラー文が出てしまいます。 ほしい情報が違いましたら、すいません また、ご指摘いただければと思います
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.35%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問