whatisgithub

What is ruby-build?

rubys/ruby-build — explained in plain English

Analysis updated 2026-07-16 · repo last pushed 2013-03-25

ShellAudience · developerComplexity · 2/5DormantLicenseSetup · moderate

In one sentence

A command-line tool that downloads, compiles, and installs any version of the Ruby programming language on your computer, so you can easily switch between versions for different projects.

Mindmap

mindmap
  root((repo))
    What it does
      Downloads Ruby source
      Compiles and installs
      Verifies file safety
    How it works
      Used with rbenv
      Standalone mode available
      Custom build settings
    Key features
      Download mirror support
      Cached downloads
      Custom version definitions
    Use cases
      Multiple Ruby versions
      Legacy app maintenance
      Precise install control
    Audience
      Ruby developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Install and switch between multiple Ruby versions for different projects on the same computer.

USE CASE 2

Maintain a legacy Ruby application while building a new project that needs a modern Ruby version.

USE CASE 3

Install Ruby into a specific custom directory without using rbenv for precise control.

USE CASE 4

Reinstall a previously downloaded Ruby version quickly using cached files without re-downloading.

What is it built with?

ShellBashUnix build tools

How does it compare?

rubys/ruby-buildalexbloch-ia/legal-datachloevpin/kiro-arm64
Stars00
LanguageShellShellShell
Last pushed2013-03-25
MaintenanceDormant
Setup difficultymoderatemoderatemoderate
Complexity2/52/53/5
Audiencedevelopergeneralops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Unix build tools like gcc and make to be installed, plus curl for downloads.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

ruby-build is a tool that lets you install different versions of the Ruby programming language on your computer. It is most commonly used as a companion to a popular Ruby management tool called rbenv, adding a simple command that downloads, compiles, and sets up whatever specific version of Ruby you need. At a high level, the software automates the messy work of building Ruby from its raw source code. Instead of manually hunting down the right files, figuring out the correct configuration settings, and running build commands, you just tell it which version you want. It then downloads the necessary code, verifies that the downloaded files are safe and uncorrupted using checksums, compiles everything, and installs it into a specific folder on your machine. This tool is primarily used by Ruby developers who need to manage multiple projects that rely on different versions of the language. For example, a developer might maintain an older application running on Ruby 1.9.3 while simultaneously building a new project that requires a modern version like Ruby 3.2.0. It allows them to switch between these versions seamlessly on the same computer without conflicts. It can also be used without rbenv as a standalone program if someone needs very precise control over exactly where and how Ruby is installed. The project includes several smart features to make builds faster and more reliable. It uses a download mirror sponsored by 37signals to fetch files quickly, automatically falling back to official source websites if the mirror is down. It also supports download caching, meaning if you uninstall and reinstall a particular version later, it can reuse the previously downloaded files instead of fetching them from the internet all over again. For advanced users, it allows for fine-tuning of the build process through environment variables and custom definition files for versions of Ruby that are not officially supported yet.

Copy-paste prompts

Prompt 1
I have ruby-build installed. Write the command to install Ruby 3.2.0 and then install Ruby 1.9.3 so I can switch between them for different projects.
Prompt 2
Help me set up ruby-build as a standalone tool without rbenv to install Ruby into a custom directory at /opt/myruby. Show me the commands and explain the environment variables I can use to fine-tune the build.
Prompt 3
I want to create a custom definition file for a Ruby version that ruby-build does not officially support yet. Walk me through the file format and where to place it so ruby-build can find and install that version.
Prompt 4
Explain how ruby-build download caching works and give me the steps to clear the cache or change the cache directory location using environment variables.

Frequently asked questions

What is ruby-build?

A command-line tool that downloads, compiles, and installs any version of the Ruby programming language on your computer, so you can easily switch between versions for different projects.

What language is ruby-build written in?

Mainly Shell. The stack also includes Shell, Bash, Unix build tools.

Is ruby-build actively maintained?

Dormant — no commits in 2+ years (last push 2013-03-25).

What license does ruby-build use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is ruby-build to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is ruby-build for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.