-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate RUBY_PREFIX_PATH and RUBY_MAKE_INSTALL_OPTS="DESTDIR" paths don't work in Ruby 2 #686
Comments
I have never done this, so I don't know what goes wrong where. Maybe a Ruby you're trying to package up shouldn't come with default gems, because some of those contain native extensions that might not support moving to a different directory. Anyway, since this is most likely an issue with Ruby itself, you should better take it with the Ruby core team and let us know how it went. |
Thanks for the response! So, I did some more digging today and I am fairly sure this is actually a ruby-build issue surrounding the
As far as I can tell, there are two issues at play here. First off,
then trying to force it to use the path to ruby:
and that got me past the initial step but failed here:
So, I'm not sure where to go from there, but it does look like the issue is with ruby-build after all. For now I can work around the problem by using a custom definition without the Thanks again for responding so quickly initially, and happy holidays! |
Hmm you might be on to something here. |
Im also seeing this issue, anyone found a way around it? |
@bcg62, as a workaround you can remove
The build is finished successfully. Also, I was trying to update
but it fails with:
|
I'm sorry to hijack this old issue, but as a quick search did not get me any results, could someone briefly explain to me what different purposes of |
Ok, from reading around I suspect that |
Maybe |
Just adding a note here that since this issue last got updated (many years ago), ruby-build changed its @sschuberth Your guess as to how RUBY_PREFIX_PATH can be used in combination with RUBY_MAKE_INSTALL_OPTS="DESTDIR=..." is correct, at least in theory. I have not prepared Ruby for packaging myself, but that is how it's supposed to work. However, I'm reluctant to add this to official ruby-build documentation. I do not believe that ruby-build should be an intermediary in packaging Ruby. I think that whoever is packaging Ruby should be downloading Ruby directly from official sources, verifying checksums, and passing environment variables and build configuration explicitly so that they have complete control and oversight over the packaging process, rather than invoke ruby-build that does certain things by "magic" (such as automatically downloading and compiling OpenSSL if missing). Does that make sense? |
I'd say it depends 😉 If by "packing" something "serious" like packaging for a Linux distribution is meant, then you're probably right. But I'm coming from here, so packaging refers to something I only do for my own Docker images. Independently of that, I don't really see why |
Thanks for sharing your use-case. I'm not familiar with mise, and frankly I do not understand what's being talked about in the thread (and at which level of that is ruby-build is involved?), but if you could try out the packaging approach using these environment variables and if that works for you, I'm open to adding a documentation blurb about this. Please open a new issue for the documentation task, as well as more information about how this is to be used in combination with Docker. Thanks! |
Hello!
This might not necessarily be an implementation bug but rather a change in which envvars are parsed and where in Ruby 1.9.3 vs Ruby 2. I'm experiencing the same issue described in this comment of #493.
The following options work for Ruby 1.9.3:
but this fails under 2.1.5:
with this error:
Again, this probably isn't a bug in ruby-build but is an issue I'm running into trying to generate a Ruby install that can be packaged using fpm. Any insights would be greatly appreciated!
The text was updated successfully, but these errors were encountered: