ruby on rails - Adding minitests/reporters to test_helper.rb - error message -
so bit beyond knowledge. added minitests/reporters test_helper.rb doing following :
i installed minitest reporters gem : gem install minitest-reporters
, added require
in test_helper.rb
:
require "minitest/reporters" minitest::reporters.
when run tests, here : should reinstall gems?
running via spring preloader in process 15917 /home/ubuntu/workspace/sample_app/db/schema.rb doesn't exist yet. run `rails db:migrate` create it, try again. if not intend use database, should instead alter /home/ubuntu/workspace/sample_app/config/application.rb limit frameworks loaded. /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:293:in `require': cannot load such file -- minitest/reporters (loaderror) /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:293:in `block in require' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:259:in `load_dependency' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:293:in `require' /home/ubuntu/workspace/sample_app/test/test_helper.rb:4:in `<top (required)>' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:293:in `require' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:293:in `block in require' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:259:in `load_dependency' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:293:in `require' /home/ubuntu/workspace/sample_app/test/controllers/static_pages_controller_test.rb:1:in `<top (required)>' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:293:in `require' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:293:in `block in require' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:259:in `load_dependency' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:293:in `require' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-5.0.0.rc2/lib/rails/test_unit/test_requirer.rb:11:in `block in require_files' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-5.0.0.rc2/lib/rails/test_unit/test_requirer.rb:10:in `each' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-5.0.0.rc2/lib/rails/test_unit/test_requirer.rb:10:in `require_files' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-5.0.0.rc2/lib/rails/test_unit/minitest_plugin.rb:76:in `plugin_rails_init' /usr/local/rvm/gems/ruby-2.3.0/gems/minitest-5.9.0/lib/minitest.rb:80:in `block in init_plugins' /usr/local/rvm/gems/ruby-2.3.0/gems/minitest-5.9.0/lib/minitest.rb:78:in `each' /usr/local/rvm/gems/ruby-2.3.0/gems/minitest-5.9.0/lib/minitest.rb:78:in `init_plugins' /usr/local/rvm/gems/ruby-2.3.0/gems/minitest-5.9.0/lib/minitest.rb:129:in `run' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-5.0.0.rc2/lib/rails/commands/test.rb:9:in `<top (required)>' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:293:in `require' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:293:in `block in require' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:259:in `load_dependency' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:293:in `require' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-5.0.0.rc2/lib/rails/commands/commands_tasks.rb:138:in `require_command!' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-5.0.0.rc2/lib/rails/commands/commands_tasks.rb:95:in `test' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-5.0.0.rc2/lib/rails/commands/commands_tasks.rb:49:in `run_command!' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-5.0.0.rc2/lib/rails/commands.rb:18:in `<top (required)>' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:293:in `require' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:293:in `block in require' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:259:in `load_dependency' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:293:in `require' /home/ubuntu/workspace/sample_app/bin/rails:9:in `<top (required)>' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:287:in `load' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:287:in `block in load' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:259:in `load_dependency' /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:287:in `load' /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' -e:1:in `<m
here did , worked :
1- added test_helper.rb following : require "minitest/reporters" minitest::reporters.use!
2- added gemfile following : gem 'minitest', group: :test gem 'minitest-reporters', group: :test
3- run rails test
Comments
Post a Comment