由于某些无法解释的原因,当 Heroku CI 在测试环境中构建应用程序时,它似乎删除了我的 /spec 目录。
下面的错误说,require': cannot load such file -- spec_helper (LoadError)
当我使用 Heroku 调试器时heroku ci:debug --pipeline myapp
,我看到没有规范目录。如果我运行rake
或者bundle exec rake
它给了我在构建 UI 中看到的相同错误。
为什么可能会删除此目录?
-----> Running test command `rake`...
/app/vendor/ruby-2.3.7/bin/ruby -I/app/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.7.1/lib:/app/vendor/bundle/ruby/2.3.0/gems/rspec-support-3.7.1/lib /app/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.7.1/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
/app/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.7.1/lib/rspec/core/configuration.rb:1455:in `require': cannot load such file -- spec_helper (LoadError)
from /app/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.7.1/lib/rspec/core/configuration.rb:1455:in `block in requires='
from /app/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.7.1/lib/rspec/core/configuration.rb:1455:in `each'
from /app/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.7.1/lib/rspec/core/configuration.rb:1455:in `requires='
from /app/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.7.1/lib/rspec/core/configuration_options.rb:112:in `block in process_options_into'
from /app/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.7.1/lib/rspec/core/configuration_options.rb:111:in `each'
from /app/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.7.1/lib/rspec/core/configuration_options.rb:111:in `process_options_into'
from /app/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.7.1/lib/rspec/core/configuration_options.rb:21:in `configure'
from /app/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:99:in `setup'
from /app/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:86:in `run'
from /app/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:71:in `run'
from /app/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.7.1/lib/rspec/core/runner.rb:45:in `invoke'
from /app/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.7.1/exe/rspec:4:in `<main>'
/app/vendor/ruby-2.3.7/bin/ruby -I/app/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.7.1/lib:/app/vendor/bundle/ruby/2.3.0/gems/rspec-support-3.7.1/lib /app/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.7.1/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed
-----> test command `rake` failed with exit status 1