我在MiniTest和Guard上遇到了一个非常奇怪的问题。运行rake test
时,我得到了一个冗长的文件转储:
dispatch/testing/integration.rb
2114 /Users/tfantina/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/head.rb
2103 /Users/tfantina/.rvm/gems/ruby-2.6.0/gems/react-rails-2.5.0/lib/react/rails/test_helper.rb
2115 /Users/tfantina/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/file.rb
2116 /Users/tfantina/.rvm/gems/ruby-2.6.0/gems/rack-2.0.7/lib/rack/sendfile.rb
2104 /Users/tfantina/.rvm/gems/ruby-2.6.0/gems/actionpack-6.0.0.rc1/lib/action_controller/metal/renderers.rb
2117 /Users/tfantina/.rvm/gems/ruby-2.6.0/gems/actionpack-6.0.0.rc1/lib/action_dispatch/middleware/static.rb
2105 /Users/tfantina/.rvm/gems/ruby-2.6.0/gems/actionview-6.0.0.rc1/lib/action_view/cache_expiry.rb
2118 /Users/tfantina/.rvm/gems/ruby-2.6.0/gems/actionpack-6.0.0.rc1/lib/action_dispatch/middleware/executor.rb
2106 /Users/tfantina/.rvm/gems/ruby-2.6.0/gems/activestorage-6.0.0.rc1/lib/active_storage/attached/model.rb
...
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: https://www.ruby-lang.org/bugreport.html
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: https://www.ruby-lang.org/bugreport.html
[IMPORTANT][IMPORTANT]
Don't forget to include the Crash Report log file underDon't forget to include the Crash Report log file under
DiagnosticReports directory in bug reports.DiagnosticReports directory in bug reports.
Finished in 0.077730s, 0.0000 runs/s, 0.0000 assertions/s.
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips
然后您可以看到测试套件未运行。我向上滚动到iTerm2中的这些错误的顶部,以查看可能触发了初始错误的原因,但是它比iTerm2的历史记录更长,因此我将首选项设置为“无限滚动”,但无论它在那条2114行附近中断了什么。 VSCode的内置编辑器中也发生了同样的事情。
我想看看Terminal是否显示更多行,所以我在Terminal中运行了它,并且测试套件运行得很好,没有问题。
关于这可能是什么的任何想法?
我将发布我的gemfile供参考,请告诉我是否还有其他应发布的内容。
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.6.0'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.0.rc1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 4.0'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'
gem 'react-rails'
gem 'prettier'
# Use Active Storage variant
# gem 'image_processing', '~> 1.2'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.2', require: false
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of web drivers to run system tests with browsers
gem 'webdrivers'
gem 'guard'
gem 'minitest-reporters'
gem 'guard-minitest'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]