# ruby-build

> Download, compile, and install Ruby on Unix-like systems

Source: https://talira.ai/catalog/ruby-build-2k2ehfh6
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool, Plugin
- Categories: [developer tools / environment / version managers](https://talira.ai/categories/developer-tools/environment/version-managers), [languages / ruby](https://talira.ai/categories/languages/ruby)
- Platforms: macos, linux, cli[^3]
- Licence: MIT[^4]
- Pricing: Free and open source[^4]
- Pricing notes: Free and open source under the MIT licence.
- Free tier: yes[^4]
- Self-hostable: yes[^3]
- Creator: Sam Stephenson

ruby-build is a command-line tool that installs any Ruby version from source on Unix-like systems. It works as an rbenv plugin (the rbenv install command) or on its own as ruby-build: it downloads the official source tarball, configures and compiles it, links a suitable [OpenSSL](https://talira.ai/catalog/openssl-fxkppzee.md) (building one if needed) and checks that the new Ruby works. It ships build definitions for CRuby, JRuby, mruby, PicoRuby and TruffleRuby, and takes custom definitions, mirrors and build flags through environment variables.

## Links

- GitHub: https://github.com/rbenv/ruby-build
- Docs: https://rbenv.org/man/ruby-build.1

## Ways to install

### Package managers

- [Homebrew](https://talira.ai/catalog/homebrew-djy17yn9.md): <https://formulae.brew.sh/formula/ruby-build>[^1]
- [APT](https://talira.ai/catalog/apt-d7essv0z.md): <https://packages.debian.org/stable/ruby-build>[^2]

## Problems it solves

- install the exact Ruby version a project needs, compiled from source
- get rbenv install working so I can switch between Ruby versions per project
- install JRuby, TruffleRuby or mruby alongside the standard Ruby
- compile Ruby linked against a working OpenSSL without fighting configure flags
- build a patched or custom Ruby from my own build definition
- install the newest patch release of a Ruby series without looking up the exact version number
- speed up repeated Ruby installs by caching downloaded source tarballs or using a mirror

## Features

- rbenv install command as an rbenv plugin
- standalone ruby-build command
- build definitions for CRuby, JRuby, mruby, PicoRuby and TruffleRuby
- installs the latest release of a series (rbenv install 3)
- custom build definition files and directories
- links or builds a compatible OpenSSL
- download cache and mirror support
- configure, make and compiler flags through environment variables

## Limitations

- Doesn't run on Windows: it builds Ruby from source on Unix-like systems[^3]
- Doesn't know about a new Ruby release until you upgrade it: each version's build definition ships with ruby-build[^3]
- Doesn't check for system build dependencies before compiling: install build tools and development headers first[^3]

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.64 out of 1.
Signals: maintenance 0.87, adoption 0.72, momentum 0.41, community 0.99, backing 0.20, extensibility 0.20.

- last commit 18 days ago
- 41 commits in the last 90 days
- latest release v20261023 32 days ago
- 4.0k GitHub stars
- 294 contributors
- created by Sam Stephenson

## Alternatives

- [Fullstaq Ruby](https://talira.ai/catalog/fullstaq-ruby-c05w1qqq.md): A server-optimised Ruby distribution: precompiled MRI packages built with jemalloc and malloc_trim.
- [RVM](https://talira.ai/catalog/rvm-x17t9bbc.md): Ruby Version Manager: install several Ruby interpreters side by side and switch between them, each with its own named gemsets.
- [asdf](https://talira.ai/catalog/asdf-50ez7g9r.md): Manage multiple runtime versions with a single CLI tool, extendable via plugins
- [mise](https://talira.ai/catalog/mise-0axr08xw.md): dev tools, env vars, task runner
- [pyenv](https://talira.ai/catalog/pyenv-6tqnn2vz.md): Simple Python version management
- [tfenv](https://talira.ai/catalog/tfenv-f1mbyz2b.md): Terraform version manager inspired by rbenv

## Sources

[^1]: https://formulae.brew.sh/api/formula.json (checked 21 Nov 2026)
[^2]: https://deb.debian.org/debian/dists/stable/main/source/Sources.xz (checked 21 Nov 2026)
[^3]: https://github.com/rbenv/ruby-build/blob/master/README.md (checked 19 Nov 2026)
[^4]: https://github.com/rbenv/ruby-build/blob/master/LICENSE (checked 19 Nov 2026)
