我最近运行了更新:

gem update --system
gem update

现在,每次加载 gem 时,都会出现很多弃用警告。例如,rails console:
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/user/.rvm/gems/ruby-1.9.2-p180@global/specifications/rake-0.8.7.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/user/.rvm/gems/ruby-1.9.2-p180@global/specifications/rake-0.8.7.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/user/.rvm/gems/ruby-1.9.2p180@global/specifications/rake-0.8.7.gemspec:10.
Loading development environment (Rails 3.0.7)
ruby-1.9.2-p180 :001 > exit

我使用RVM,Ruby 1.9.2和Rubygems 1.8.1。有什么办法解决这个问题?还原为旧版本的rubygems?

最佳答案

我不得不降级到1.6.2。这些通知绝对是荒谬的。它们使最新版本完全无法使用。确实应该有一种禁用它们的方法,但是在此之前:
sudo gem update --system 1.6.2

关于ruby - 如何解决Rubygems最近弃用警告?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/5949521/

10-14 06:29