Gem 为啥安装 Nokogiri 枚举每个版本? 如图

sevk · 2020年03月21日 · 最后由 sevk 回复于 2020年03月23日 · 3065 次阅读

为啥安装 nokogiri 枚举每个版本?

你安装命令是什么?不是通过

gem install nokogiri 

吧?这个源也有点神奇。

lanzhiheng 回复

命令是:

gem install nokogiri -VN
sevk 回复

好像说是要建立索引文件 https://github.com/rubygems/rubygems/issues/494 ,得看源码才知道具体机制。里面得人也说这是正常行为。 🤐 https://github.com/rubygems/rubygems/issues/494#issuecomment-27658632

lanzhiheng 回复

他们怎么想的,这还正常啊。看了最后一行,状态是 open 的,估计还在修。

https://github.com/rubygems/rubygems/issues/494#issuecomment-16973114

https://github.com/tuna/issues/issues/374

这里有个坑:

Please consider reverse-proxying https://api.rubygems.org/api/v1/dependencies at /rubygems/api/v1/dependencies so that dependency lists are fetched through this API, instead of calculated locally, by downloading and parsing all gemspec.rz files.

For your reference, here is a Caddyfile that I use to test the feasibility of the reverse proxy:

localhost:8081
log stderr

proxy /rubygems https://mirrors.tuna.tsinghua.edu.cn {
    except /rubygems/api
}

proxy /rubygems/api https://api.rubygems.org {
    without /rubygems
}

(I am fully aware of the "we don't do reverse proxy" policy of this site, so this is only filed in the hope of being useful to all RubyGems mirror users)
franklinyu 回复

2016 年...

需要 登录 后方可回复, 如果你还没有账号请 注册新账号