https://rubygems.org/不是URI

时间:2021-05-21 23:32:36

While trying to add any URL to gem sources, I find that this URL is not a URI. For example when I execute

在尝试向gem源添加任何URL时,我发现此URL不是URI。例如,当我执行时

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

任何帮助表示赞赏

2 个解决方案

#1


0  

I think the problem is related to the uri component of Ruby itself. 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

我认为这个问题与Ruby本身的uri组件有关。我认为以下工作:转到/lib/ruby/1.9.3/uri,打开common.rb,找到userinfo并用这一行替换定义

ret[:USERINFO] = userinfo = "(?:[#{unreserved};:&=+$,\\\\]|#{escaped})*"

#2


0  

might be the DNS problem, although i am not sure but give it a try with open DNS like 8.8.8.8

可能是DNS问题,虽然我不确定,但试试开放DNS,如8.8.8.8

#1


0  

I think the problem is related to the uri component of Ruby itself. 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

我认为这个问题与Ruby本身的uri组件有关。我认为以下工作:转到/lib/ruby/1.9.3/uri,打开common.rb,找到userinfo并用这一行替换定义

ret[:USERINFO] = userinfo = "(?:[#{unreserved};:&=+$,\\\\]|#{escaped})*"

#2


0  

might be the DNS problem, although i am not sure but give it a try with open DNS like 8.8.8.8

可能是DNS问题,虽然我不确定,但试试开放DNS,如8.8.8.8