我最近运行了更新:
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?
发布于 2011-05-10 19:59:58
我不得不降级到1.6.2。这些通知绝对是荒谬的。它们使得最新版本完全不可用。确实应该有一种方法来禁用它们,但在此之前:
sudo gem update --system 1.6.2
发布于 2011-05-21 12:42:36
您还可以使用更多特定于RVM的rvm rubygems current
来返回到更安全的gem版本(现在是1.6.2)。
发布于 2011-05-20 02:36:14
我接受了别人的答案,并把它们写成了对我来说更有效的东西。我仍然需要从/usr/local/cellar中手动删除几个。
#!/usr/bin/env bash
#
brew install gnu-sed
sudo gem pristine --all --no-extensions
gems=$(gem -v 2>&1 | grep called | gsed -r -e 's#^.*specifications/##' -e 's/-[0-9].*$//')
for gem in $gems
do
echo Fixing $gem...
sudo gem pristine $gem -- -build-arg
done
https://stackoverflow.com/questions/5949521
复制相似问题