推送 gem 时出错。 RubyGems.org 无法处理此 gem。元数据无效。未知别名:id001

Error pushing gem. RubyGems.org cannot process this gem. The metadata is invalid. Unknown alias: id001

我们 gem 的 0.1 版已在 rubygems 发布,但无法推出新版本。 Rubygem 总是 returns:

ricardofiel$ gem push -V invoicexpress-0.1.2.gem
GET http://rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
GET http://production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
Pushing gem to https://rubygems.org...
POST https://rubygems.org/api/v1/gems
422 Unprocessable Entity
RubyGems.org cannot process this gem.
The metadata is invalid.
Unknown alias: id001

.gem 文件的完整来源如下。有任何想法吗?谢谢

lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'invoicexpress/version'

Gem::Specification.new do |spec|
  spec.add_development_dependency 'bundler', '~> 1.0'

  spec.add_dependency 'faraday', '~> 0.8'
  spec.add_dependency 'faraday_middleware', '~> 0.9'
  spec.add_dependency 'happymapper', '~> 0.4'

  spec.authors = ["Think Orange"]
  spec.description = %q{Simple wrapper for invoicexpress.com API}
  spec.email = ['info@thinkorange.pt']
  spec.files = %w(CHANGELOG.md README.md Rakefile invoicexpress.gemspec)
  spec.files += Dir.glob("lib/**/*.rb")
  spec.files += Dir.glob("spec/**/*")
  spec.homepage = "http://invoicexpress.com"
  spec.licenses = ['MIT']
  spec.name = 'invoicexpress'
  spec.require_paths = ['lib']
  spec.required_rubygems_version = '>= 1.3.6'
  spec.summary = spec.description
  spec.test_files = Dir.glob("spec/**/*")
  spec.version = Invoicexpress::VERSION
end

https://github.com/weareswat/invoicexpress-gem

https://rubygems.org/gems/invoicexpress

问题

RubyGems.org 现在正在使用更现代的 YAML 解析器版本,它更安全且具有更多功能。 这个解析器对旧版本的 YAML 更严格,据我所知你使用的是旧版本,因为你使用的是旧版本 rubygem 客户端:

(来自您的 .gem 文件) rubygems_version: 1.6.2

解决方案

升级rubygem客户端: gem update --system

编辑

我们修复了 rubygems.org, https://github.com/rubygems/rubygems.org/pull/894 ,所以这应该会再次起作用。

谢谢