ruby-install
ruby-install copied to clipboard
Support binary builds (like RVM does)
That would be a killer feature.
Rubinius is working on binary builds and JRuby/MagLev already supports them. MRI is the odd one out, unless we use RVM's builds. We should eventually add alternate functions for unpacking binary installs.
This would entail adding a --binary option and BINARY_INSTALL env variable which would disable downloading/compiling the source archive.
JRuby and Rubinius both have binary packages. RVM provides precompiled versions of MRI. http://rvm.io/binaries/
Pushing this back to 0.3.0, since binary support will require changing a considerable amount of code. 0.2.0 already has enough new features as well.
Will this make it into 0.4.0?
Possibly. The problem is that RVM only supports binary builds for the latest versions of OSes, which means we'll have to fall back to compiling if the binary cannot be downloaded.
I think a binary if you can approach, but fall back to compilation would be a very reasonable solution.
Or failing if no binary is available is another option, which would mean having to remove the -b flag to compile when binary installation fails.
Can I use ruby-install to replace https://github.com/tokaido/tokaido-build?
@rkh based on the build.sh and some grepping, rvm install --movable basically adds these ./configure options:
(( ${rvm_movable_flag:-0} > 0 )) || return 0
case "${_system_type}" in
(Darwin)
rvm_configure_flags+=(
--enable-load-relative --with-static-linked-ext
--with-out-ext=dl/win32,fiddle/win32,tk/tkutil,tk,win32ole,-test-/win32/dln,-test-/win32/fd_setsize
)
rvm_patch_names+=( osx_static )
;;
(*)
rvm_configure_flags+=( --enable-load-relative )
;;
esac
rvm_configure_flags+=( --sysconfdir=/etc )
rvm_make_flags+=( -j3 )
You should be able to replace rvm install ruby --movable with ruby-install -i /path/to/where_ever ruby -- --enable-static --enable-load-relative.
Thanks, I'll give this a try after the upcoming conference action.
I generally would not mind replacing rvm usage at Travis CI with something I understand.
Opened a PR for this: #138.
rvm/rvm#4298 could be related.
Noticed that RVM's binaries haven't been updated recently. Not seeing binaries for newer versions of Ubuntu, Fedora, or OSX. https://rvm.io/binaries/ That seems like a blocker for average users not using ruby-install in an older VM or docker image.
@postmodern Yes, and rvm/rvm#4298 has been talking about it. RVM team made barely any progress about this since last year though.
Note that rvm also downloads binaries from http://rubies.travis-ci.org/.
@rkh Awesome! I’m curious whether they are path-dependent though. Will need some research.
I think it would help if one picks a binary from the page, and try it in a virtual machine. At least we can verify the Ubuntu binaries this way.
I'm not working with Ruby in a professional setting at the moment, so I don't think I'll have time to look into this any time soon, sorry.