宝石推送结果"包元数据丢失"

时间:2014-05-01 22:19:59

标签: ruby rubygems gemspecs

我试图将我更新的gem推送到rubygems.com并获得以下结果。

 ~/dev/V2/V2GPTI (master) $ gem build v2gpti.gemspec
  Successfully built RubyGem
  Name: v2gpti
  Version: 0.2
  File: v2gpti-0.2-universal-darwin-13.gem
 ~/dev/V2/V2GPTI (master) $ gem push v2gpti.gemspec 
ERROR:  While executing gem ... (Gem::Package::FormatError)
    package metadata is missing in v2gpti.gemspec
 ~/dev/V2/V2GPTI (master) $ 

自上次推送以来,我对我的gem规范所做的唯一更改是添加parseconfig依赖项。这是我的宝石规格。

Gem::Specification.new do |s|
  s.name        = 'v2gpti'
  s.version     = '0.2'
  s.platform = Gem::Platform.local
  s.summary     = 'Git commands for integration with Pivotal Tracker'
  s.description = 'Provides a set of additional Git commands to help developers when working with Pivotal Tracker'
  s.authors     = ['Ben Hale', 'Jeff Wolski']
  s.email       = 'jeff@xxxxxxxxx.com'
  s.homepage    = 'https://github.com/v2dev/V2GPTI'
  s.license     = 'Apache-2.0'

  s.files            = %w(LICENSE NOTICE README.md) + Dir['lib/**/*.rb'] + Dir['lib/**/*.sh'] + Dir['bin/*']
  s.executables      = Dir['bin/*'].map { |f| File.basename f }
  s.test_files       = Dir['spec/**/*_spec.rb']

  s.required_ruby_version = '>= 1.8.7'

  s.add_dependency 'highline', '~> 1.6'
  s.add_dependency 'pivotal-tracker', '~> 0.5'
  s.add_dependency 'parseconfig', '~> 1.0'

  s.add_development_dependency 'bundler', '~> 1.3'
  s.add_development_dependency 'rake', '~> 10.0'
  s.add_development_dependency 'redcarpet', '~> 2.2'
  s.add_development_dependency 'rspec', '~> 2.13'
  s.add_development_dependency 'simplecov', '~> 0.7'
  s.add_development_dependency 'yard', '~> 0.8'

我在gemspec中遗漏了什么吗?

1 个答案:

答案 0 :(得分:20)

不要推动gemspec,推送实际建造的宝石:

$ gem push v2gpti-0.2-universal-darwin-13.gem