开发者

Rails Deprecated Warning

I have been trying to get rid of these deprecated warnings for 2 weeks now with no luck. Woul开发者_JAVA技巧d truly be grateful if someone could point me in the right direction.

First Warning

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.

Second Warning

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

Third Warning

/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


The first error is coming from REDIS. Judging by a quick googling, it's coming when Redis is trying to load the gem system_timer. Try adding that to your gems and see if it resolves.

The second and third error appear to be this problem in rails 2.3.5 and ruby enterprise edition. More information on the lighthouse ticket including a couple of fixes.


For the first one, just install the SystemTimer gem as instructed.

rvmsudo gem install systemtimer

For the next two, upgrade rubygems.

rvmsudo gem update --system


OK, a sideways solution. Place this in your Environments or Initializers file.

ActiveSupport::Deprecation.silenced = true
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜