5

我正在尝试将我更新的 gem 推送到 ruby​​gems.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 中遗漏了一些东西?

4

1 回答 1

20

不要推gemspec,推实际构建的gem:

$ gem push v2gpti-0.2-universal-darwin-13.gem
于 2014-05-01T22:23:12.500 回答