Rubygems NoMethodError
(Ruby 1.8) 出现错误。
这些是旧的 Rails 2.3 站点,所以我希望不必升级到 1.9。
它发生在所有 gem 命令中,包括gem -v
.
错误是rubygems.rb:959:in '_deprecated_source_index': undefined method 'dirs' for Gem::Specification:Class (NoMethodError)
。
这是完整的堆栈跟踪:
NOTE: Gem.searcher is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.searcher called from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:34.
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /usr/lib/ruby/site_ruby/1.8/rubygems/gem_path_searcher.rb:81.
/usr/lib/ruby/site_ruby/1.8/rubygems.rb:959:in `_deprecated_source_index': undefined method `dirs' for Gem::Specification:Class (NoMethodError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/deprecate.rb:39:in `skip_during'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:958:in `_deprecated_source_index'
from /usr/lib/ruby/site_ruby/1.8/rubygems/deprecate.rb:63:in `send'
from /usr/lib/ruby/site_ruby/1.8/rubygems/deprecate.rb:63:in `source_index'
from /usr/lib/ruby/site_ruby/1.8/rubygems/gem_path_searcher.rb:81:in `init_gemspecs'
from /usr/lib/ruby/site_ruby/1.8/rubygems/gem_path_searcher.rb:13:in `initialize'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:951:in `new'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:951:in `_deprecated_searcher'
from /usr/lib/ruby/site_ruby/1.8/rubygems/deprecate.rb:63:in `send'
from /usr/lib/ruby/site_ruby/1.8/rubygems/deprecate.rb:63:in `searcher'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:34:in `require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:50
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:8
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/bin/gem:9