我同时使用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>'
这很奇怪,因为当我启动rails服务器和rails控制台时,这个文件(config/application.rb
)被加载,没有任何问题。
“可疑”行是:config.assets.paths << Rails.root.join("vendor","assets","bower_components")
,如果我将其注释掉,则下一个类似的配置行将标记为错误行。
你有没有猜到为什么会抛出这个错误?