簡體   English   中英

CircleCI 與 Rspec 獲取 LoadError:無法加載此類文件 -- rspec_junit_formatter

[英]CircleCI with Rspec getting LoadError: cannot load such file -- rspec_junit_formatter

Rails 7.0.0.alpha2

圓CI

規格

使用https://github.com/CircleCI-Public/circleci-demo-ruby-rails 中的默認設置

Circle CI 崩潰:

bundler: failed to load command: rspec (/home/circleci/project/vendor/bundle/ruby/2.7.0/bin/rspec)
LoadError: cannot load such file -- rspec_junit_formatter
  /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters.rb:235:in `require'
  /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters.rb:235:in `rescue in custom_formatter'
  /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters.rb:232:in `custom_formatter'
  /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters.rb:183:in `find_formatter'
  /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters.rb:152:in `add'
  /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:974:in `add_formatter'
  /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration_options.rb:118:in `block in load_formatters_into'
  /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration_options.rb:118:in `each'
  /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration_options.rb:118:in `load_formatters_into'
  /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration_options.rb:24:in `configure'
  /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:132:in `configure'
  /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:99:in `setup'
  /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:86:in `run'
  /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:71:in `run'
  /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:45:in `invoke'
  /home/circleci/project/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/exe/rspec:4:in `<top (required)>'
  /home/circleci/project/vendor/bundle/ruby/2.7.0/bin/rspec:23:in `load'
  /home/circleci/project/vendor/bundle/ruby/2.7.0/bin/rspec:23:in `<top (required)>'

Exited with code exit status 1
CircleCI received exit code 1


固定:

添加到Gemfile並運行 bundle install

gem 'rspec_junit_formatter'

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM