我们在rubygems中发布了我们的宝石版本0.1,但无法推送它的新版本。 Rubygems总是返回:
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
答案 0 :(得分:2)
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,所以这应该再次有效。
感谢