gpt4 book ai didi

ruby-on-rails - Rspec 停止工作 - `':未初始化的常量 ActionController::Metal (NameError)

转载 作者:行者123 更新时间:2023-12-04 06:01:45 25 4
gpt4 key购买 nike

我在玩 cucumber 时发现我的 Rspec 测试开始失败。在我安装 cucumber 之前一切都运行良好。有任何想法吗?

日志

/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>'

最佳答案

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

希望对你有帮助。

关于ruby-on-rails - Rspec 停止工作 - `<module:ActionController>':未初始化的常量 ActionController::Metal (NameError),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26517910/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com