Rails consoleをテスト環境で実行しようとしてもエラーが出てできません。
エラーを調べてみたのですが解決策が見つかりませんでした。
教えていただけると助かります。
エラー内容
rails console test
Traceback (most recent call last):
8: from bin/rails:4:in <main>' 7: from bin/rails:4:in
require'
6: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3/lib/rails/commands.rb:18:in <top (required)>' 5: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3/lib/rails/command.rb:46:in
invoke'
4: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3/lib/rails/command/base.rb:69:in perform' 3: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in
dispatch'
2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in invoke_command' 1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in
run'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3/lib/rails/commands/console/console_command.rb:95:in perform': wrong number of arguments (given 1, expected 0) (ArgumentError) 9: from bin/rails:4:in
<main>'
8: from bin/rails:4:in require' 7: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3/lib/rails/commands.rb:18:in
<top (required)>'
6: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3/lib/rails/command.rb:46:in invoke' 5: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.0.3/lib/rails/command/base.rb:69:in
perform'
4: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in dispatch' 3: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in
invoke_command'
2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:20:in run' 1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:34:in
rescue in run'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.0.1/lib/thor/base.rb:525:in `handle_argument_error': ERROR: "rails console" was called with arguments ["test"] (Thor::InvocationError)
Usage: "rails console [options]"
回答1件
あなたの回答
tips
プレビュー