我试图将一个gem上传到Rubygems,但它会抛出这个错误:
$ gem push voxel4r.gemspec -V
GET http://rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
GET http://production.s3.rubygems.org/latest_specs.4.8.gz
304 Not Modified
Pushing gem to https://rubygems.org...
POST https://rubygems.org/api/v1/gems
422 Unprocessable Entity
RubyGems.org cannot process this gem.
Please try rebuilding it and installing it locally to make sure it's valid.
成功建造:
$ gem build voxel4r.gemspec
Successfully built RubyGem
Name: voxel4r
Version: 0.0.1
File: voxel4r-0.0.1.gem
我有一个Rubygems帐户,我有~/.gem/credentials
个文件。
我还能做什么?
答案 0 :(得分:4)
我犯了一个错误:
我试图推送gemspec文件而不是gem文件。
$ gem push voxel4r-0.0.1.gem -V
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
200 OK
Successfully registered gem: voxel4r (0.0.1)