RUBY-BUILD(1)
π 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 ofruby-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 ofTMPDIR) β 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 inPATH) β one of"aria2c","curl", or"wget"to use for downloading πRUBY_BUILD_ARIA2_OPTSβ additional options to pass toaria2cfor downloadingRUBY_BUILD_CURL_OPTSβ additional options to pass tocurlfor downloadingRUBY_BUILD_WGET_OPTSβ additional options to pass towgetfor downloadingRUBY_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 URLRUBY_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 toRUBY_BUILD_ROOTCCβ path to the C compiler π§RUBY_CFLAGSβ additionalCFLAGSoptions to use for Ruby compilationCONFIGURE_OPTSβ additional"./configure"argumentsMAKE(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 sourceRUBY_MAKE_OPTSβ additional make arguments that apply only to Ruby sourceRUBY_MAKE_INSTALL_OPTSβ additional"make install"arguments that apply only to Ruby sourceNO_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 β
- https://github.com/rbenv/ruby-build#readme
- https://github.com/rbenv/ruby-build/wiki
- https://github.com/rbenv/ruby-build/discussions
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
- debian trixie: ruby-build 20241225.2-1.1 Β· MIT
- ubuntu questing: ruby-build 20241225.2-1.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms