美文网首页ruby
gem push 提示bad URI(is not URI?):

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

作者: 6593443e12c1 | 来源:发表于2017-03-30 10:19 被阅读57次

    写个轻量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
    

    相关文章

      网友评论

        本文标题:gem push 提示bad URI(is not URI?):

        本文链接:https://www.haomeiwen.com/subject/ebyuottx.html