RUBY-BUILD(1)
β¨ ruby-build β¨
aka the manual page for ruby-build, from the ruby-build Manual π
πΈ 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 bestie, here's the whole vibe: ruby-build downloads, compiles, and installs a Ruby version β the one named by the definition argument β into the location you give it as prefix. that's it. that's the whole thing. 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 follows. cute, right?
the definition argument can also be a path to a file on disk β in which case it gets sourced into ruby-build as a bash script. π
and optionally, you can list extra Ruby configure-args after "--" and they'll get forwarded to the ./configure invocation. forward them. slay.
by default, all compile output is redirected to a log file at $TMPDIR/ruby-build.*.log. if you wanna skip the log file and print everything to standard streams, just activate verbose mode. π
π OPTIONS π
-l,--listβ list latest stable releases for each Ruby π--definitionsβ list all local definitions, including the outdated ones (yes, even the old ones, we don't judge) ποΈ--versionβ show version ofruby-buildπ·οΈ-d,--dirβ install the Ruby in theprefix/definitiondestination instead of directly inprefixπ-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, bestie) π±-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 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 toRUBY_BUILD_ROOTπCCβ path to the C compiler π§RUBY_CFLAGSβ additionalCFLAGSoptions to use for Ruby compilationCONFIGURE_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 π
- https://github.com/rbenv/ruby-build#readme
- https://github.com/rbenv/ruby-build/wiki
- https://github.com/rbenv/ruby-build/discussions
π AUTHOR π
Mislav MarohniΔ
and that's the whole page, bestie π go forth and install Ruby, you absolute icon π«Ά
this was ruby-build 20250916.1, dated 2024-09-23, from the ruby-build Manual. periodt. π
π¦ where this page comes from
- fedora 43: ruby-build 20250916.1-1.fc43 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms