Replies: 1 comment
-
While searching for a solution I noticed there is already is PR #1793 for that, sorry that I missed that. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
we would like to use a internal mirror to download ruby.
We did a proxy for https://cache.ruby-lang.org/pub/ruby/ but that url does not accept a hash. How can we still use it as mirror?
Let's assume our mirror url is https://cache-pub-ruby/.
RUBY_BUILD_MIRROR_URL
RUBY_BUILD_MIRROR_URL=https://cache-pub-ruby/ rbenv install --verbose 3.3.9
tries https://cache-pub-ruby/d1991690a4e17233ec6b3c7844c1e1245c0adce3e00d713551d0458467b727b1
curl -q -fL -o ruby-3.3.9.tar.gz https://cache-pub-ruby/d1991690a4e17233ec6b3c7844c1e1245c0adce3e00d713551d0458467b727b1
doesn't work since the url does not accept any hash.
RUBY_BUILD_MIRROR_PACKAGE_URL
RUBY_BUILD_MIRROR_PACKAGE_URL=https://cache-pub-ruby/ rbenv install --verbose 3.3.9
tries https://cache-pub-ruby/
curl -q -fL -o ruby-3.3.9.tar.gz https://cache-pub-ruby/
tries to directly download the package without specifying the version.
I also noted that http_head_curl returns 400 for my mirror, meaning it never uses any of the provided urls and will always use the original url. I removed the http head part (https://github.com/rbenv/ruby-build/blob/master/bin/ruby-build#L506) locally to check what url it then will try to get.
I guess the easiest solution would be to mirror an endpoint that accepts the hash but I couldn't find it on https://cache.ruby-lang.org/.
My workaround now is to execute
curl -q -fL -o "$(rbenv root)/cache/ruby-3.3.9.tar.gz" https://cache-pub-ruby/3.3/ruby-3.3.9.tar.gz
How can is setup my mirror correctly?
Beta Was this translation helpful? Give feedback.
All reactions