在将 Rails 从 4.2.9 更新到 4.2.10 后 Teaspoon 已损坏。项目没有其他任何变化。
这是测试套件达到茶匙时的失败:
Starting the Teaspoon server...
[33337] Puma starting in cluster mode...
[33337] * Version 3.10.0 (ruby 2.3.3-p222), codename: Russell's Teapot
[33337] * Min threads: 5, max threads: 5
[33337] * Environment: test
[33337] * Process workers: 2
[33337] * Preloading application
[33337] * Listening on tcp://127.0.0.1:63120
[33337] Use Ctrl-C to stop
[33337] - Worker 0 (pid: 33351) booted, phase: 0
[33337] - Worker 1 (pid: 33352) booted, phase: 0
Teaspoon running default suite at http://127.0.0.1:63120/teaspoon/default
Error: ActionView::Template::Error: Asset was not declared to be precompiled in production.
Add `Rails.application.config.assets.precompile += %w( support/bind-poly.self.js )` to `config/initializers/assets.rb` and restart your server
/Users/meltemi/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/helper.rb:363:in `raise_unless_precompiled_asset'
只运行 Teaspoon rake teaspoon
(而不是rake
作为默认套件default [:teaspoon]
的一部分),它的失败有点不同:
...
Teaspoon running default suite at http://127.0.0.1:63120/teaspoon/default
Failed to load: http://127.0.0.1:63120/teaspoon/default?reporter=Console
rake teaspoon failed
[33352] ! Detected parent died, dying
这lib/sprockets/rails/helper.rb
是它绊倒的那一行:
def raise_unless_precompiled_asset(path)
raise Helper::AssetNotPrecompiled.new(path) if @check_precompiled_asset && !precompiled?(path)
end
Rails 之间的差异不大4.2.9...4.2.10
。希望你们中的一个更聪明的人能抓住可能引发这种情况的原因。似乎它可能与资产管道或供应宝石的路线有关......但这只是一个猜测!?!
https://github.com/rails/rails/compare/v4.2.9...v4.2.10