测试旧的 Rails 应用程序:循环参数引用警告,无法加载测试/单元/断言 [英] Testing older Rails app: circular argument reference warning, cannot load test/unit/assertions

查看:34
本文介绍了测试旧的 Rails 应用程序:循环参数引用警告,无法加载测试/单元/断言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CentOS-6.6红宝石 2.2.0p0(2014-12-25 修订版 49005)[x86_64-linux-gnu]捆绑器版本 1.7.11

CentOS-6.6 ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux-gnu] Bundler version 1.7.11

我正在尝试修补去年升级到 4.0.1 的旧版 RoR 应用程序.当我在进行任何更改之前运行 bundle exec 黄瓜时,我现在收到此类错误:

I am attempting to patch a older RoR application that was upgraded to 4.0.1 last year. When I run bundle exec cucumber before making any changes I now get this sort of error:

bundle exec cucumber

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now

cannot load such file -- test/unit/assertions (LoadError)

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require'

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `block in require'

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:214:in `load_dependency'

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require'

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/features/support/local_env.rb:5:in `<top (required)>'
/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:223:in `load'

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:223:in `block in load'

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:214:in `load_dependency'

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:223:in `load'

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/gems/cucumber-1.3.19/lib/cucumber/rb_support/rb_language.rb:95:in `load_code_file'

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/gems/cucumber-1.3.19/lib/cucumber/runtime/support_code.rb:180:in `load_file'

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/gems/cucumber-1.3.19/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/gems/cucumber-1.3.19/lib/cucumber/runtime/support_code.rb:82:in `each'

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/gems/cucumber-1.3.19/lib/cucumber/runtime/support_code.rb:82:in `load_files!'

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/gems/cucumber-1.3.19/lib/cucumber/runtime.rb:184:in `load_step_definitions'

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/gems/cucumber-1.3.19/lib/cucumber/runtime.rb:42:in `run!'

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/gems/cucumber-1.3.19/lib/cucumber/cli/main.rb:47:in `execute!'

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/gems/cucumber-1.3.19/bin/cucumber:13:in `<top (required)>'

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/bin/cucumber:23:in `load'

/home/byrnejb/Projects/Software/theHeart/code/hll_th_forex_rss/libexec/bundler/lib/ruby/2.2.0/bin/cucumber:23:in `<main>'

警告:循环参数引用 - xxxx 仅限于 Cucumber,以前是 1.3.10.所以我将黄瓜更新到 1.3.19.现在我在主动支持中遇到错误.有没有其他人看到这个.

warning: circular argument reference - xxxx was limited to Cucumber, which formerly was at 1.3.10. So I updated cucumber to 1.3.19. Now I am getting the error in active support. Has anyone else seen this.

我在 Minitest 上遇到了一个问题,阻止了这个项目在去年春天推进到 RoR-4.1.我不知道这是否相关,但为了完整起见,我将其包括在内.

I had a problem with Minitest preventing this project from advancing to RoR-4.1 back last spring. I do not know if this is pertinent or not but I include it for completeness.

无论如何,谁将测试依赖项放入分布式运行时代码中?为什么 activesupport 抱怨测试/单元/断言"?

In any case, who puts testing dependencies into distributed runtime code? Why is activesupport complaining about 'test/unit/assertions'?

推荐答案

尝试从 Rails 4.0.1 升级到 4.0.13

Try upgrading from Rails 4.0.1 to 4.0.13

如果这不起作用,请尝试使用 Ruby 2.1.5 以查看是否收到相同的错误消息.我敢打赌,您正在使用的某些 gem 会遇到 Ruby 2.2 的这个问题.示例 1示例 2.Rails 示例 3.

If that doesn't work, try using Ruby 2.1.5 to see if you get the same error message. I bet some gem you're using is running into this issue with Ruby 2.2. Example 1, Example 2. Example 3 from Rails.

长期的解决方案是使用与 Ruby 2.2 兼容的 gem,但是通过暂时切换到 2.1.5,您可能能够在短期内解决问题并缩小导致错误的特定 gem 版本的范围.

The long term solution is to use Ruby 2.2 compatible gems, but by switching to 2.1.5 temporarily, you may be able to solve the problem in the short term and narrow down the specific gem versions that are causing the error.

这篇关于测试旧的 Rails 应用程序:循环参数引用警告,无法加载测试/单元/断言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆