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