ruby-install icon indicating copy to clipboard operation
ruby-install copied to clipboard

Support binary builds (like RVM does)

Open rkh opened this issue 12 years ago • 19 comments

That would be a killer feature.

rkh avatar Jun 03 '13 11:06 rkh

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.

postmodern avatar Jun 04 '13 03:06 postmodern

This would entail adding a --binary option and BINARY_INSTALL env variable which would disable downloading/compiling the source archive.

postmodern avatar Jun 04 '13 03:06 postmodern

JRuby and Rubinius both have binary packages. RVM provides precompiled versions of MRI. http://rvm.io/binaries/

postmodern avatar Jun 17 '13 05:06 postmodern

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.

postmodern avatar Jun 23 '13 01:06 postmodern

Will this make it into 0.4.0?

brndnblck avatar Jan 07 '14 18:01 brndnblck

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.

postmodern avatar Jan 08 '14 00:01 postmodern

I think a binary if you can approach, but fall back to compilation would be a very reasonable solution.

brndnblck avatar Jan 08 '14 19:01 brndnblck

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.

havenwood avatar Jan 08 '14 19:01 havenwood

Can I use ruby-install to replace https://github.com/tokaido/tokaido-build?

rkh avatar Mar 19 '14 09:03 rkh

@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.

postmodern avatar Mar 21 '14 06:03 postmodern

Thanks, I'll give this a try after the upcoming conference action.

rkh avatar Mar 21 '14 19:03 rkh

I generally would not mind replacing rvm usage at Travis CI with something I understand.

rkh avatar Mar 21 '14 19:03 rkh

Opened a PR for this: #138.

sarahhodne avatar Apr 02 '14 04:04 sarahhodne

rvm/rvm#4298 could be related.

FranklinYu avatar Aug 08 '19 14:08 FranklinYu

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 avatar Oct 29 '19 10:10 postmodern

@postmodern Yes, and rvm/rvm#4298 has been talking about it. RVM team made barely any progress about this since last year though.

FranklinYu avatar Oct 30 '19 06:10 FranklinYu

Note that rvm also downloads binaries from http://rubies.travis-ci.org/.

rkh avatar Nov 08 '19 08:11 rkh

@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.

FranklinYu avatar Nov 09 '19 23:11 FranklinYu

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.

rkh avatar Nov 11 '19 12:11 rkh