前提・実現したいこと
Rub on Railsのチュートリアルの4章をやっています
rails testを実行したい
rails testを実行しようとしたらエラーメッセージが表示された
googleで調べたけど何を直せばいいかわからない
herokuにアップしてからrails testができなくなった気がする
発生している問題・エラーメッセージ
rails testしようとしたらこう表示されました。
Running via Spring preloader in process 15611 /Library/Ruby/Gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require': cannot load such file -- minitest/reporters (LoadError) from /Library/Ruby/Gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `block in require' from /Library/Ruby/Gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in `load_dependency' from /Library/Ruby/Gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `require' from /Users/yuzi/rails/sample_app/test/test_helper.rb:4:in `<main>' from /Library/Ruby/Gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require' from /Library/Ruby/Gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi' from /Library/Ruby/Gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register' from /Library/Ruby/Gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi' from /Library/Ruby/Gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require' from /Library/Ruby/Gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `block in require' from /Library/Ruby/Gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in `load_dependency' from /Library/Ruby/Gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `require' from /Users/yuzi/rails/sample_app/test/controllers/static_pages_controller_test.rb:1:in `<main>' from /Library/Ruby/Gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require' from /Library/Ruby/Gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi' from /Library/Ruby/Gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register' from /Library/Ruby/Gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi' from /Library/Ruby/Gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require' from /Library/Ruby/Gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `block in require' from /Library/Ruby/Gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in `load_dependency' from /Library/Ruby/Gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `require' from /Library/Ruby/Gems/2.3.0/gems/railties-5.2.0/lib/rails/test_unit/runner.rb:50:in `block in load_tests' from /Library/Ruby/Gems/2.3.0/gems/railties-5.2.0/lib/rails/test_unit/runner.rb:50:in `each' from /Library/Ruby/Gems/2.3.0/gems/railties-5.2.0/lib/rails/test_unit/runner.rb:50:in `load_tests' from /Library/Ruby/Gems/2.3.0/gems/railties-5.2.0/lib/rails/test_unit/runner.rb:39:in `run' from /Library/Ruby/Gems/2.3.0/gems/railties-5.2.0/lib/rails/commands/test/test_command.rb:33:in `perform' from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run' from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command' from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch' from /Library/Ruby/Gems/2.3.0/gems/railties-5.2.0/lib/rails/command/base.rb:65:in `perform' from /Library/Ruby/Gems/2.3.0/gems/railties-5.2.0/lib/rails/command.rb:46:in `invoke' from /Library/Ruby/Gems/2.3.0/gems/railties-5.2.0/lib/rails/commands.rb:18:in `<main>' from /Library/Ruby/Gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require' from /Library/Ruby/Gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi' from /Library/Ruby/Gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register' from /Library/Ruby/Gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi' from /Library/Ruby/Gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require' from /Library/Ruby/Gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `block in require' from /Library/Ruby/Gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in `load_dependency' from /Library/Ruby/Gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `require' from /Users/yuzi/rails/sample_app/bin/rails:9:in `<main>' from /Library/Ruby/Gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load' from /Library/Ruby/Gems/2.3.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load' from /Library/Ruby/Gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:277:in `block in load' from /Library/Ruby/Gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in `load_dependency' from /Library/Ruby/Gems/2.3.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:277:in `load' from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from -e:1:in `<main>'
試したこと
rails db:migrate
最初にエラーメッセージがでたとき、
rails db:migration
をやれとターミナルに表示されて試してみたが、結局rails testはできず
Gemfileの内容をherokuにアップするために
group :production do gem 'pg' end group :development, :test do gem 'sqlite3' end
と変更したせいだろうか
補足情報(FW/ツールのバージョンなど)
Ruby on Rails 5.2
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。