更改 rbenv 下载镜像

change rbenv download mirrors

Here说我可以通过设置RUBY_BUILD_MIRROR_URL环境变量来改变镜像:

You can point ruby-build to another mirror by specifying the RUBY_BUILD_MIRROR_URL environment variable--useful if you'd like to run your own local mirror, for example. Package mirror URLs are constructed by joining this variable with the SHA2 checksum of the package file.

那我就设置好了。但它不起作用:

aries@mac-book-air: echo $RUBY_BUILD_MIRROR_URL
https://ruby.taobao.org
aries@mac-book-air: rbenv install 2.3.0                                                                                                                                                                                        
Downloading ruby-2.3.0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.bz2

此外,我没有在我的环境中设置 RUBY_BUILD_SKIP_MIRROR 变量。

rbenv版本:1.0.0,ruby-build为最新版本。 Mac OS X 版本:

ProductName:    Mac OS X
ProductVersion: 10.11.4
BuildVersion:   15E65

我们可以看到它并没有使用我用那个环境变量设置的镜像。

有人知道怎么解决吗?谢谢。

根据this发现镜像url不支持。问题已解决。