[英]https://rubygems.org/ is not a URI
While trying to add any URL to gem sources, I find that this URL is not a URI. 尝试将任何URL添加到gem来源时,我发现此URL不是URI。 For example when I execute 例如当我执行
gem sources -a https://rubygems.org
It tells me that 告诉我
https://rubygems.org is not a URI https://rubygems.org不是URI
Any help is appreciated 任何帮助表示赞赏
I think the problem is related to the uri component of Ruby itself. 我认为问题与Ruby本身的uri组件有关。 I think following will work: Go to /lib/ruby/1.9.3/uri
, open common.rb
, find userinfo and replace the definition with this line 我认为以下方法会起作用:转到/lib/ruby/1.9.3/uri
,打开common.rb
,找到userinfo并用此行替换定义
ret[:USERINFO] = userinfo = "(?:[#{unreserved};:&=+$,\\\\]|#{escaped})*"
可能是DNS问题,尽管我不确定,但可以尝试使用开放式DNS(例如8.8.8.8)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.