Tuesday, June 30, 2015

ERROR: "https://rubygems.org" is not allowed by the gemspec, which only allows "TODO: Set to 'http://mygemserver.com'"

Problem: 

Not able to publish gem to rubygems.org

Resolution:

Delete the following lines from your-gem.gemspec file.

  if spec.respond_to?(:metadata)
    spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
  else
    raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
  end