LoadError: cannot load such file -- test_helperを解決したい
Railsチュートリアルの11章にてLoadError: cannot load such file -- test_helperと表示される
発生している問題・エラーメッセージ
LoadError: cannot load such file -- test_helper
該当のソースコード
Running via Spring preloader in process 15850 Traceback (most recent call last): 31: from -e:1:in `<main>' 30: from /home/ec2-user/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 29: from /home/ec2-user/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 28: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in `load' 27: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in `load_dependency' 26: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in `block in load' 25: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in `load' 24: from /home/ec2-user/environment/sample_app/bin/rails:9:in `<top (required)>' 23: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require' 22: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in `load_dependency' 21: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `block in require' 20: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require' 19: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in `<top (required)>' 18: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/railties-5.1.6/lib/rails/command.rb:44:in `invoke' 17: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/railties-5.1.6/lib/rails/command/base.rb:63:in `perform' 16: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch' 15: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command' 14: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run' 13: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/railties-5.1.6/lib/rails/commands/test/test_command.rb:38:in `perform' 12: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/railties-5.1.6/lib/rails/test_unit/runner.rb:39:in `run' 11: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/railties-5.1.6/lib/rails/test_unit/runner.rb:50:in `load_tests' 10: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/railties-5.1.6/lib/rails/test_unit/runner.rb:50:in `each' 9: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/railties-5.1.6/lib/rails/test_unit/runner.rb:50:in `block in load_tests' 8: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require' 7: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in `load_dependency' 6: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `block in require' 5: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require' 4: from /home/ec2-user/environment/sample_app/test/controllers/account_activations_controller_test.rb:1:in `<top (required)>' 3: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require' 2: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in `load_dependency' 1: from /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `block in require' /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:292:in `require': cannot load such file -- test_helper (LoadError)
試したこと
一度test/helpers/test_helper.rbを削除し、再作成しましたがうまく行きません。
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。