两周以来,我一直试图摆脱这些已弃用的警告,但没有成功。如果有人能指出我正确的方向,我将不胜感激。
第一次警告
WARNING: using the built-in Timeout class which is known to have issues when used for opening connections. Install the SystemTimer gem if you want to make sure the Redis client will not hang.
第二次警告
/Users/ChuckJHardy/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.7/lib/bundler/shared_helpers.rb:101:Warning: Gem::LoadError#version_requirement= is deprecated and will be removed on or after January 2011. Use #requirement.
第三次警告
/Users/ChuckJHardy/Code/Sites/www/vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
最佳答案
第一个错误来自 REDIS。从 quick googling 来看,它是在 Redis 尝试加载 gem system_timer 时到来的。尝试将其添加到您的 gem 中,看看它是否能解决。
第二个和第三个错误在 rails 2.3.5 和 ruby 企业版中似乎是 this problem。有关 lighthouse ticket 的更多信息,包括一些修复。
关于ruby-on-rails - Rails 已弃用警告,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/4706159/