RUBY-BUILD(1)

πŸ“¦
version 20241225.2 Β· 5 versions
, in debian trixie, ubuntu questing

πŸ’– RUBY-BUILD πŸ’–

okay bestie, so this is the manual for ruby-build, from the ruby-build Manual (yes that's the manual name, we're keeping it cute). it's the little script that ✨downloads, compiles, and installs✨ a version of Ruby for you, and honestly? it's giving main character energy in your toolchain.


✨ NAME ✨

ruby-build β€” download, compile, and install a version of Ruby 🌸


πŸŽ€ SYNOPSIS πŸŽ€

ruby-build [-dvpk] <definition> <prefix> [-- <configure-args>...]
ruby-build {--list|--definitions}
ruby-build --version

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the vibe. ruby-build downloads, compiles, and installs a Ruby version β€” the one named by the definition argument β€” into the location you give it with prefix. that's the whole job. no cap. 🫢

the definition argument can optionally start with "ruby-", and if it does, it resolves to a CRuby that matches the version number that comes right after. slay.

the definition argument can also be a path to a file on disk, and in that case it gets sourced into ruby-build as a bash script. iykyk. πŸ“œ

optionally, extra Ruby configure-args can be listed after -- and they'll get forwarded straight to the ./configure invocation. ✨

by default, all compile output is redirected to a log file at $TMPDIR/ruby-build.*.log. wanna see everything instead? activate verbose mode to skip the log file and print everything to standard streams. πŸ”₯


πŸ’… OPTIONS πŸ’…

  • -l, --list β€” list latest stable releases for each Ruby πŸ‘‘
  • --definitions β€” list all local definitions, including the outdated ones (yes, even the vintage ones bestie) πŸ’€
  • --version β€” show version of ruby-build 🏷️
  • -d, --dir β€” install the Ruby in the prefix/definition destination instead of directly in prefix πŸ“
  • -v, --verbose β€” verbose mode: forward all build output to stdout/stderr πŸ“’
  • -p, --patch β€” apply a patch from stdin before building 🩹
  • -k, --keep β€” do not remove source tree after installation (keep it, hoard it, it's yours) πŸ—ƒοΈ
  • -4, --ipv4 β€” resolve names to IPv4 addresses only 4️⃣
  • -6, --ipv6 β€” resolve names to IPv6 addresses only 6️⃣

🌈 EXAMPLES 🌈

install a Ruby version while tweaking some configuration options:

$ ruby-build 3.2.2 /path/to/destination -- --disable-install-doc --with-openssl-dir=/opt/openssl

install a Ruby version to ~/.rubies/ruby-3.2.2:

$ ruby-build --dir ruby-3.2.2 ~/.rubies

install a Ruby version to ~/.rbenv/versions/3.3.5:

$ ruby-build --dir 3.3.5 ~/.rbenv/versions

usage as rbenv plugin, accomplishes the same as the previous example:

$ rbenv install 3.3.5

🌸 ENVIRONMENT VARIABLES 🌸

  • TMPDIR β€” the location to write temporary files on disk πŸ—‚οΈ
  • RUBY_BUILD_BUILD_PATH (default: a timestamped subdirectory of TMPDIR) β€” the build location for downloading source files to and compiling πŸ—οΈ
  • RUBY_BUILD_CACHE_PATH (default: "~/.rbenv/cache" if invoked as rbenv plugin) β€” where to cache downloaded package files 🧺
  • RUBY_BUILD_HTTP_CLIENT (default: first tool found in PATH) β€” one of "aria2c", "curl", or "wget" to use for downloading 🌐
  • RUBY_BUILD_ARIA2_OPTS β€” additional options to pass to aria2c for downloading
  • RUBY_BUILD_CURL_OPTS β€” additional options to pass to curl for downloading
  • RUBY_BUILD_WGET_OPTS β€” additional options to pass to wget for downloading
  • RUBY_BUILD_MIRROR_URL (default: a sponsored Amazon CloudFront mirror) β€” custom mirror URL root to download packages from πŸͺž
  • RUBY_BUILD_MIRROR_PACKAGE_URL β€” custom complete mirror URL
  • RUBY_BUILD_SKIP_MIRROR β€” bypass the download mirror and fetch all package files from their original URLs πŸš€
  • RUBY_BUILD_ROOT (default: "share/ruby-build" within ruby-build install location) β€” custom build definition directory πŸ“‚
  • RUBY_BUILD_TARBALL_OVERRIDE β€” override the URL to fetch the ruby tarball from, optionally followed by "#<checksum>"
  • RUBY_BUILD_DEFINITIONS β€” paths to search for build definitions in addition to RUBY_BUILD_ROOT
  • CC β€” path to the C compiler πŸ”§
  • RUBY_CFLAGS β€” additional CFLAGS options to use for Ruby compilation
  • CONFIGURE_OPTS β€” additional "./configure" arguments
  • MAKE (default: "make") β€” custom make command (e.g., "gmake") πŸ› οΈ
  • MAKE_OPTS, MAKEOPTS β€” additional arguments for "make"
  • MAKE_INSTALL_OPTS β€” additional arguments for "make install"
  • RUBY_CONFIGURE_OPTS β€” additional "./configure" arguments that apply only to Ruby source
  • RUBY_MAKE_OPTS β€” additional make arguments that apply only to Ruby source
  • RUBY_MAKE_INSTALL_OPTS β€” additional "make install" arguments that apply only to Ruby source
  • NO_COLOR (default: allow colors when connected to terminal) β€” disable ANSI colors in output 🚫🌈
  • CLICOLOR_FORCE β€” use ANSI colors in output even when not connected to a terminal 🌈✨

⭐ NOTES ⭐

like, go read them, bestie, they're literally right there 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Mislav MarohniΔ‡ πŸ’œ


and that's the whole page!! this was ruby-build version 20241225.2, dated 2024-09-24 β€” tysm for reading, ily, go install a ruby πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from