ruby

gem push 提示bad URI(is not URI?):

2017-03-30  本文已影响57人  6593443e12c1

写个轻量pubsub gem包
最后push时候得到

Pushing gem to https://rubygems.org...
ERROR:  While executing gem ... (URI::InvalidURIError)
    bad URI(is not URI?): TODO: Set to 'http://mygemserver.com'

最后看代码发现把observ.gemsec里如下代码删除就好了

# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
# to allow pushing to a single host or delete this section to allow pushing to any host.
  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
上一篇 下一篇

猜你喜欢

热点阅读