Rspec停止工作 - “<module:actioncontroller>”:未初始化的常量ActionController :: Metal(NameError)</module:actioncontroller>

时间:2014-10-22 22:04:52

标签: ruby-on-rails rspec

我正在玩黄瓜,只是注意到我的Rspec测试开始失败了。在我安装黄瓜之前,一切都运行良好。有任何想法吗?

LOG

/Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.1.5/lib/action_controller/base.rb:164:in `<module:ActionController>': uninitialized constant ActionController::Metal (NameError)
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.1.5/lib/action_controller/base.rb:5:in `<top (required)>'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/responders-1.1.1/lib/responders.rb:1:in `<top (required)>'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/devise-3.4.0/lib/devise.rb:7:in `<top (required)>'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
    from /Users/szymonborucki/code/rails/Challenger/spec/spec_helper.rb:18:in `<top (required)>'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.6/lib/rspec/core/configuration.rb:1072:in `block in requires='
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.6/lib/rspec/core/configuration.rb:1072:in `each'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.6/lib/rspec/core/configuration.rb:1072:in `requires='
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.6/lib/rspec/core/configuration_options.rb:103:in `block in process_options_into'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.6/lib/rspec/core/configuration_options.rb:102:in `each'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.6/lib/rspec/core/configuration_options.rb:102:in `process_options_into'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.6/lib/rspec/core/configuration_options.rb:22:in `configure'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.6/lib/rspec/core/runner.rb:95:in `setup'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.6/lib/rspec/core/runner.rb:84:in `run'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.6/lib/rspec/core/runner.rb:69:in `run'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.6/lib/rspec/core/runner.rb:37:in `invoke'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.1.6/exe/rspec:4:in `<top (required)>'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/bin/rspec:23:in `load'
    from /Users/szymonborucki/.rbenv/versions/2.1.0/bin/rspec:23:in `<main>'

1 个答案:

答案 0 :(得分:1)

如果我是你,我会检查该行:/Users/szymonborucki/code/rails/Challenger/spec/spec_helper.rb:18

我希望它有所帮助。