我同时使用rake spec
并rspec spec/
尝试运行我的 rspec 测试,但出现以下错误:
/home/XXX/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/application/configuration.rb:49:in `initialize': uninitialized constant ActiveSupport::Logger::SimpleFormatter (NameError)
from /home/XXX/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/application.rb:364:in `new'
from /home/XXX/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/application.rb:364:in `config'
from /home/XXX/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/railtie.rb:123:in `config'
from /home/XXX/proj/candiru/config/application.rb:26:in `<class:Application>'
from /home/XXX/proj/candiru/config/application.rb:11:in `<module:Candiru>'
这很奇怪,因为config/application.rb
当我启动 rails 服务器和 rails 控制台时加载了这个文件(),没有任何问题。
“可疑”行是:config.assets.paths << Rails.root.join("vendor","assets","bower_components")
,如果我将其注释掉,下一个类似的配置行将标记为错误行。
你有任何猜测为什么会抛出这个错误吗?