2011-03-21 51 views
4

我的設置:Rails的2.3.9,紅寶石1.8.7,1.6.2寶石,Mac OS X的寶石緩存被棄用

我產生一個支架,得到了這樣的警告

/Library/Ruby/Gems/1.8/gems/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. 

我不t打算改變lookup.rb,因爲它是一個Rails生成器文件,所以我該如何解決這個警告?

回答

3

廢棄警告,告訴我們什麼都會改變/在軌

的未來版本中,我發現了一個article在那裏的展示瞭如何切換此警告關閉刪除。

對於一個一站式的,一般情況下,解決方案做:

ActiveSupport::Deprecation.silenced = true 

文章有一對夫婦更細粒度的解決方案。

1

不要擔心,因爲它是一個生成器文件,它會被更新到這個日期。