table of contents
RUBY-BUILD(1) | ruby-build Manual | RUBY-BUILD(1) |
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¶
ruby-build downloads, compiles, and installs a Ruby version named by the definition argument into the location specified by prefix.
The definition argument can optionally start with "ruby-", in which case it resolves to a CRuby that matches the version number that follows.
The definition argument can be a path to a file on disk, in which case it is sourced into ruby-build as a bash script.
Optionally, extra Ruby configure-args may be listed after "--" and will get forwarded to the ./configure invocation.
By default, all compile output is redirected to a log file at $TMPDIR/ruby-build.*.log. Activate the verbose mode to skip the log file and print everything to standard streams.
OPTIONS¶
-l, --list
--definitions
--version
-d, --dir
-v, --verbose
-p, --patch
-k, --keep
-4, --ipv4
-6, --ipv6
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
RUBY_BUILD_BUILD_PATH (default: a timestamped subdirectory of TMPDIR)
RUBY_BUILD_CACHE_PATH (default: "~/.rbenv/cache" if invoked as rbenv plugin)
RUBY_BUILD_HTTP_CLIENT (default: first tool found in PATH)
RUBY_BUILD_ARIA2_OPTS
RUBY_BUILD_CURL_OPTS
RUBY_BUILD_WGET_OPTS
RUBY_BUILD_MIRROR_URL (default: a sponsored Amazon CloudFront mirror)
RUBY_BUILD_MIRROR_PACKAGE_URL
RUBY_BUILD_SKIP_MIRROR
RUBY_BUILD_ROOT (default: "share/ruby-build" within ruby-build install location)
RUBY_BUILD_TARBALL_OVERRIDE
RUBY_BUILD_DEFINITIONS
CC
RUBY_CFLAGS
CONFIGURE_OPTS
MAKE (default: "make")
MAKE_OPTS, MAKEOPTS
MAKE_INSTALL_OPTS
RUBY_CONFIGURE_OPTS
RUBY_MAKE_OPTS
RUBY_MAKE_INSTALL_OPTS
NO_COLOR (default: allow colors when connected to terminal)
CLICOLOR_FORCE
NOTES¶
AUTHOR¶
Mislav Marohnić
2024-09-24 | ruby-build 20241213 |