如何修复"RubyGems.org 无法处理此宝石。元数据无效。未知别名:id001"



未能发布ruby宝石:

$ bundle exec rake release
widgeon 1.1.4 built to pkg/widgeon-1.1.4.gem.
Tagged v1.1.4.
Pushed git commits and tags.
rake aborted!
Pushing gem to https://rubygems.org...
RubyGems.org cannot process this gem.
The metadata is invalid.
Unknown alias: id001
/Users/ayia/.rvm/gems/ruby-1.8.7-head/gems/bundler-1.7.0/lib/bundler/gem_helper.rb:149:in `sh'
/Users/ayia/.rvm/gems/ruby-1.8.7-head/gems/bundler-1.7.0/lib/bundler/gem_helper.rb:83:in `rubygem_push'
/Users/ayia/.rvm/gems/ruby-1.8.7-head/gems/bundler-1.7.0/lib/bundler/gem_helper.rb:77:in `release_gem'
/Users/ayia/.rvm/gems/ruby-1.8.7-head/gems/bundler-1.7.0/lib/bundler/gem_helper.rb:49:in `install'
/Users/ayia/.rvm/gems/ruby-1.8.7-head/bin/ruby_executable_hooks:15
Tasks: TOP => release
(See full trace by running task with --trace)

有什么问题吗?

以前它有效。。。随着时间的推移,我对gemspec进行了一些更改,但现在我将其恢复到原始版本,它仍然不起作用。。。

谷歌搜索没有帮助。。。

更新:gemspec:

# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'widgeon/version'
Gem::Specification.new do |spec|
  spec.name          = "widgeon"
  spec.version       = Widgeon::VERSION
  spec.authors       = ["Iakiv Kramarenko"]
  spec.email         = ["yashaka@gmail.com"]
  spec.summary       = %q{Yet another page objects for Capybara with the ability to create widgets opened automatically (implementation of LoadableComponent selenium pattern)}
  spec.description   = %q{Yet another page objects for Capybara of 2.0.3 version, i.e. compatible with ruby 1.8.7. Will switch to support latest versions of ruby soon}
  spec.homepage      = "https://github.com/yashaka/widgeon"
  spec.license       = "Apache License, Version 2.0"
  spec.files         = `git ls-files -z`.split("x0")
  spec.executables   = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
  spec.test_files    = spec.files.grep(%r{^(test|spec|features)/})
  spec.require_paths = ["lib"]
  spec.add_dependency 'nokogiri' , '~>1.5.10'
  spec.add_dependency 'mime-types', '= 1.25'
  spec.add_dependency 'capybara', '= 2.0.3'
  spec.add_development_dependency "bundler", "~> 1.6"
  spec.add_development_dependency "rake"
  spec.add_development_dependency "rspec"
end

问题

RubyGems.org现在使用了一个更现代的YAML解析器版本,它更安全,具有更多功能。这个解析器对旧版本的YAML更严格,而且据我所知,由于ruby 1.8.x ,您使用的是旧版本的解析器

解决方案

升级rubygem-client:gem update --system

最初试图用ruby 1.8.7 执行任务

切换到ruby 1.9.3解决了这个问题。

最新更新