Closed ZimbiX closed 3 months ago
Can you try with pacman -S ruby-stdlib --noconfirm
? Archlinux extracted stdlib like erb from ruby
package.
Thanks! I didn't know that. Installing ruby-stdlib
resolves the error (at least in the Docker example above).
However, I am still very confused why system Ruby matters at all. ruby-build compiles Ruby - why does that depend on Ruby (if installed)? That is rather surprising! And an unexpected, somewhat circular, dependency. Is this documented somewhere I missed? Cheers
Yes, I'm also not sure why installer refer system ruby. The ruby package is not required base ruby. I investigate that.
PS. I'm also member of ruby core.
I filed https://bugs.ruby-lang.org/issues/20687. So, this is not ruby-build
issue. I'm closing this.
At least on Arch Linux, when system Ruby (3.2.4) is installed, building any version of Ruby fails with:
This took a fair while to debug - I had no idea that building Ruby would have anything to do with system Ruby! Thankfully, this comment from a very similar past issue clued me in: https://github.com/rbenv/ruby-build/issues/833#issuecomment-164148732.
Steps to reproduce the behaviour
I reproduced this in Docker to prove it's not caused by something about my individual setup, and for simpler reproduction.
With
Dockerfile
:Running this in the presented Docker container fails:
whereas this succeeds:
To be specific, I tried building these versions: 3.3.4, 3.2.0, 2.7.8, 2.7.6. They all fail in the same way.
Logs
ruby-build.20240819125035.247.log--failed-with-system-ruby-installed.txt ruby-build.20240819125300.35.log--succeeded-with-system-ruby-uninstalled.txt
Env in the container:
System Ruby: