- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 Rails 6。我按照“https://www.learnenough.com/ruby-on-rails-4th-edition-tutorial”中的教程开发了一个示例 Rails 应用程序。但是,当我尝试运行“rails test”时,它会抛出Bad file descriptor (Errno::EBADF) 错误。
我的 GEM 文件:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.5.0'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.0'
# 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.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# 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
# Use mysql2 as the database for Active Record
gem 'mysql2', '~> 0.5.2'
# 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'
end
group :production do
gem 'pg', '~> 1.1', '>= 1.1.4'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
我在运行“rails test”时得到的错误是
Running via Spring preloader in process 6349
Run options: --seed 17984
# Running:
.Traceback (most recent call last):
Traceback (most recent call last):
28: from -e:1:in `<main>'
27: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
26: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
28: from -e:1:in `<main>'
25: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application/boot.rb:19:in `<top (required)>'
27: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
24: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:139:in `run'
26: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
23: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:139:in `loop'
25: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application/boot.rb:19:in `<top (required)>'
22: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:145:in `block in run'
24: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:139:in `run'
23: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:139:in `loop'
21: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:175:in `serve'
22: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:145:in `block in run'
20: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:175:in `fork'
21: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:175:in `serve'
19: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/minitest-5.11.3/lib/minitest.rb:63:in `block in autorun'
20: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:175:in `fork'
18: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/minitest-5.11.3/lib/minitest.rb:133:in `run'
19: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/minitest-5.11.3/lib/minitest.rb:63:in `block in autorun'
17: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `start'
Traceback (most recent call last):
16: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `map'
15: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `each'
18: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/minitest-5.11.3/lib/minitest.rb:133:in `run'
14: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `times'
17: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `start'
16: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `map'
15: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `each'
13: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:75:in `block in start'
14: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `times'
13: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:75:in `block in start'
12: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:75:in `fork'
11: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:95:in `block (2 levels) in start'
10: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1139:in `method_missing'
28: from -e:1:in `<main>'
9: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1159:in `with_friend'
12: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:75:in `fork'
8: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1140:in `block in method_missing'
7: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1214:in `open'
27: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
6: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1214:in `synchronize'
11: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:95:in `block (2 levels) in start'
10: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1139:in `method_missing'
9: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1159:in `with_friend'
8: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1140:in `block in method_missing'
7: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1214:in `open'
6: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1214:in `synchronize'
5: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1217:in `block in open'
4: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1217:in `each'
26: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
3: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1219:in `block (2 levels) in open'
25: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application/boot.rb:19:in `<top (required)>'
5: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1217:in `block in open'
4: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1217:in `each'
24: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:139:in `run'
2: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1263:in `alive?'
3: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1219:in `block (2 levels) in open'
23: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:139:in `loop'
2: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1263:in `alive?'
22: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:145:in `block in run'
1: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1006:in `alive?'
21: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:175:in `serve'
/Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1006:in `wait_readable' 20: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:175:in `fork'
: 1: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1006:in `alive?'
Bad file descriptor/Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1006:in `wait_readable': (Bad file descriptor 19: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/minitest-5.11.3/lib/minitest.rb:63:in `block in autorun'
(Errno::EBADFErrno::EBADF 18: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/minitest-5.11.3/lib/minitest.rb:133:in `run'
17: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `start'
)
)
16: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `map'
15: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `each'
14: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `times'
13: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:75:in `block in start'
12: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:75:in `fork'
11: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:95:in `block (2 levels) in start'
10: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1139:in `method_missing'
9: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1159:in `with_friTraceback (most recent call last):
Traceback (most recent call last):
end'
Traceback (most recent call last):
8: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1140:in `block in method_missing'
7: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1214:in `open'
6: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1214:in `synchronize'
28: from -e:1:in `<main>'
5: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1217:in `block in open'
28: from -e:1:in `<main>'
27: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
4: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1217:in `each'
28: from -e:1:in `<main>'
26: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
3: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1219:in `block (2 levels) in open'
27: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
2: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1263:in `alive?'
27: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
1: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1006:in `alive?'
/Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1006:in `wait_readable' 26: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
: 25: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application/boot.rb:19:in `<top (required)>'
25: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application/boot.rb:19:in `<top (required)>'
26: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
24: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:139:in `run'
Bad file descriptor ( 23: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:139:in `loop'
25: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application/boot.rb:19:in `<top (required)>'
22: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:145:in `block in run'
Errno::EBADF 24: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:139:in `run'
21: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:175:in `serve'
23: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:139:in `loop'
)
20: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:175:in `fork'
22: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:145:in `block in run'
19: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/minitest-5.11.3/lib/minitest.rb:63:in `block in autorun'
24: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:139:in `run'
21: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:175:in `serve'
18: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/minitest-5.11.3/lib/minitest.rb:133:in `run'
20: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:175:in `fork'
17: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `start'
19: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/minitest-5.11.3/lib/minitest.rb:63:in `block in autorun'
23: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:139:in `loop'
16: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `map'
18: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/minitest-5.11.3/lib/minitest.rb:133:in `run'
15: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `each'
17: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `start'
14: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `times'
16: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `map'
13: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:75:in `block in start'
15: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `each'
14: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `times'
13: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:75:in `block in start'
12: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:75:in `fork'
11: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:95:in `block (2 levels) in start'
10: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1139:in `method_missing'
9: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1159:in `with_friend'
8: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1140:in `block in method_missing'
7: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1214:in `open'
22: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:145:in `block in run'
6: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1214:in `synchronize'
21: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:175:in `serve'
5: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1217:in `block in open'
20: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/spring-2.1.0/lib/spring/application.rb:175:in `fork'
4: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1217:in `each'
19: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/minitest-5.11.3/lib/minitest.rb:63:in `block in autorun'
3: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1219:in `block (2 levels) in open'
18: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/minitest-5.11.3/lib/minitest.rb:133:in `run'
12: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:75:in `fork'
11: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:95:in `block (2 levels) in start'
10: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1139:in `method_missing'
9: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1159:in `with_friend'
8: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1140:in `block in method_missing'
7: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1214:in `open'
6: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1214:in `synchronize'
2: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1263:in `alive?'
5: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1217:in `block in open'
4: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1217:in `each'
3: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1219:in `block (2 levels) in open'
2: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1263:in `alive?'
1: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1006:in `alive?'
/Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1006:in `wait_readable': Bad file descriptor (Errno::EBADF)
1: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1006:in `alive?'
/Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1006:in `wait_readable': Bad file descriptor (Errno::EBADF)
17: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `start'
16: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `map'
15: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `each'
14: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:74:in `times'
13: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:75:in `block in start'
12: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:75:in `fork'
11: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:95:in `block (2 levels) in start'
10: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1139:in `method_missing'
9: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1159:in `with_friend'
8: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1140:in `block in method_missing'
7: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1214:in `open'
6: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1214:in `synchronize'
5: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1217:in `block in open'
4: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1217:in `each'
3: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1219:in `block (2 levels) in open'
2: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1263:in `alive?'
1: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1006:in `alive?'
/Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/drb/drb.rb:1006:in `wait_readable': Bad file descriptor (Errno::EBADF)
Traceback (most recent call last):
5: from -e:1:in `<main>'
4: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
3: from /Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
2: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/minitest-5.11.3/lib/minitest.rb:63:in `block in autorun'
1: from /Users/deepak/.rvm/gems/ruby-2.5.0/gems/minitest-5.11.3/lib/minitest.rb:140:in `run'
/Users/deepak/.rvm/rubies/ruby-2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0/lib/active_support/testing/parallelization.rb:118:in `shutdown': Queue not empty, but all workers have finished. This probably means that a worker crashed and 8 tests were missed. (RuntimeError)
注意:我已将默认环境设置为测试,然后运行我的应用程序。
最佳答案
在您的 /test/test_helper.rb
文件中,删除并行测试。您的文件应该类似于:
ENV['RAILS_ENV'] ||= 'test'
require_relative '../config/environment'
require 'rails/test_help'
class ActiveSupport::TestCase
# Run tests in parallel with specified workers
# OLD: parallelize(workers: :number_of_processors) <--
parallelize(workers: 1) # i.e don't run tests in parallel via forked processes
# OR just comment the line above out completely <--
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
fixtures :all
# Add more helper methods to be used by all tests here...
end
关于ruby-on-rails - 运行 "rails test"会抛出 Bad file descriptor (Errno::EBADF) 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57863565/
我删除数据库失败: mysql> 删除数据库 mydb; 错误 1010 (HY000):删除数据库时出错(不能 rmdir './mydb',errno: 39) 目录 db/mydb 存在于 my
据我所知,python的异常返回的errnos大部分与“linux/errno.h”中的errnos相同。但有时,事情并不像我期望的那样: 例如,当一个socket连接抛出一个socket.timeo
我们是否需要在调用函数之前将errno 重置为零?请参见下面的代码。现在的场景是 a_dest_path 是一个现有目录。但是当我执行代码时,它总是尝试 mkdir 但返回错误说该目录无法创建,因为它
在Red Hat Enterprise Linux Server release 5.7 上配置YUM本地源时,遇到了"[Errno 5] OSError: [Errno 2] No su
我正在尝试制作在线FPS游戏,到目前为止,它可以在我的本地网络上运行。我正在尝试做的是使其在全局范围内运作 过去,我曾尝试过使其他Python项目在全局范围内工作,但到目前为止,我还无法使其正常工作。
我希望获得有关在 Python 2.7 中使用urlopen时出现IOError: [Errno socket error] [Errno 10060]的更多信息。我正在使用我的个人 35MB/s 互
来自 linux 中 fwrite 的手册页, 描述 函数 fread() 从 stream 指向的流中读取数据的 nmemb 元素,每个 size 字节长,并将它们存储在 ptr 给定的位置。
我试图了解 glibc 如何在预处理器不替换 errno 符号的情况下初始化 errno。 我首先尝试自己基于csu/errno-loc.c实现了一个简单的版本和 csu/errno.c : myer
我看过这段代码: #if !defined(errno) extern int errno; #endif 所以我的问题是 errno 是 int 还是 macro ,因为使用 #if if 可以检查
errno.h 中的这 2 个 linux 错误有什么区别? 23 和 24 我尝试了 2 个不同的网站,但无法理解两者之间的区别。 [EMFILE] Too many open files. [EN
操作系统:Oracle Linux 6 [xxx@host /etc]$ uname -a Linux slc08yld 2.6.39-400.298.2.el5uek #1 SMP Mon Jan
什么样的库函数所面临的什么样的错误会影响errno并将其设置为非零值?在我下面的程序中,我打算使用 if(errno!=0) 作为条件来检查我使用的库函数是否正常运行,这是我发现的(见下面的代码):
我有一个 python 脚本,它创建一个 tar 文件,将文件移动到 tar 文件中,然后删除它们。 我可以毫无问题地手动运行脚本。但是当它从 cron 运行时,它失败了: IOError: [Err
我已经安装了 TensorFlow。当我下载 MNISTdataset 时,存在一个错误。谁能告诉我出了什么问题?非常感谢!错误详情如下: Python 2.7.9 (default, Apr 2
我正在尝试运行我的 python 代码,它显示以下内容: IOError: [Errno socket error] [Errno 54] Connection reset by peer 这是我的代
我正在将大量金融时间序列数据写入单个 CSV 文件。在一个实例中,我发现 to_csv 方法反复失败,但我终生无法弄清楚原因。在调用 to_csv 方法期间,一切都会挂起 10-15 分钟以上。在因错
我正在尝试从我的Python脚本打开文件recentlyUpdated.yaml。但当我尝试使用时:。我收到一个错误,内容是:。为什么?我怎样才能解决这个问题?
我正在尝试从我的Python脚本打开文件recentlyUpdated.yaml。但当我尝试使用时:。我收到一个错误,内容是:。为什么?我怎样才能解决这个问题?
我正在尝试从我的Python脚本打开文件recentlyUpdated.yaml。但当我尝试使用时:。我收到一个错误,内容是:。为什么?我怎样才能解决这个问题?
请解释以下程序中发生了什么。 我在程序的开头和结尾检查了 strerror(errno) 返回的地址,并确认它每次都返回相同的地址。然后一旦确定这一点,在第一种情况下我继续将相同的地址分配给 ptr,
我是一名优秀的程序员,十分优秀!