如何避免activesupport中的循环参数引用警告

Rpj*_*Rpj 33 ruby-on-rails activesupport

如何避免activesupport中的循环参数引用警告.发生在ruby 2.2.0上

/home/ec2-user/apps/foo_prod/shared/bundle/ruby/2.2.0/gems/activesupport-3.2.21/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now
/home/ec2-user/apps/foo_prod/shared/bundle/ruby/2.2.0/gems/ruby-ole-1.2.11.7/lib/ole/types/base.rb:265: warning: duplicated key at line 266 ignored: 4095
Run Code Online (Sandbox Code Playgroud)

shi*_*ovk 17

使用Rails 3.2.22

gem 'rails', '3.2.22'
Run Code Online (Sandbox Code Playgroud)

要么

版本1.2.11.8中的警告修复:

bundle update ruby-ole
Run Code Online (Sandbox Code Playgroud)


Tsu*_*omu 11

这是Active Support的一个问题,并已通过以下两个提交修复:

遗憾的是,这些提交从未包含在3.2版本中,因为当前的最新版本(v3.2.21)已于2014年11月18日发布,之后这些提交已合并.

如果您不想明确看到此警告消息,则应更改为Gemfile:

# gem 'rails', '3.2.21'
gem 'rails', git: 'https://github.com/rails/rails.git', branch: '3-2-stable'

否则,你应该将ruby降级到2.1或等待v3.2.22的发布,直到找到严重的安全漏洞才会发布.

毕竟,没有简单的方法来避免这个问题.Gemfile 在我看来,改变这种微不足道的烦恼可能是一种过度反应.它会延迟您的部署过程.

  • 3.2.22现在已经完成了这个修复. (3认同)

Sco*_*hea 10

我没有在我的应用程序中使用指南针基于这篇文章,我将我的Rails版本从4.1.1升级到4.1.9.


Dip*_*pta 8

这是指南针的问题在这里.他们尚未发布新版本,因此您可能需要等待它.