开发者

Gem cache is deprecated

My setup: Rails 2.3.10, Ruby 1.8.7, Gem 1.6.2, Mac OS X

I generated a scaffold and got this warning

/Library/Ruby/Gems/1.8/gems/开发者_JAVA技巧rails-2.3.10/lib/rails_generator/lookup.rb:212:Warning: Gem::cache is deprecated and will be removed on or after August 2011.  Use Gem::source_index.
/Library/Ruby/Gems/1.8/gems/rails-2.3.10/lib/rails_generator/lookup.rb:234:Warning: Gem::cache is deprecated and will be removed on or after August 2011.  Use Gem::source_index.

I don't intend to change lookup.rb since it is a Rails generator file, so how can I fix this warning?


Deprecation warnings show us what will be changed/removed in future versions of rails

I found out an article where it's shown how to switch this warnings off.

For a one stop, general, solution do:

ActiveSupport::Deprecation.silenced = true

The article has a couple of finer grained solutions.


Dont't worry, since its a generator file, it will be updated till this date.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜