{"id":13506313,"url":"https://github.com/rbenv/ruby-build","last_synced_at":"2026-04-12T14:04:05.699Z","repository":{"id":1025416,"uuid":"2142701","full_name":"rbenv/ruby-build","owner":"rbenv","description":"A tool to download, compile, and install Ruby on Unix-like systems.","archived":false,"fork":false,"pushed_at":"2025-11-26T00:09:28.000Z","size":3467,"stargazers_count":3958,"open_issues_count":7,"forks_count":796,"subscribers_count":95,"default_branch":"master","last_synced_at":"2025-11-28T12:33:52.776Z","etag":null,"topics":["hacktoberfest","rbenv-plugin","ruby","version-manager"],"latest_commit_sha":null,"homepage":"https://rbenv.org/man/ruby-build.1","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rbenv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2011-08-02T13:47:29.000Z","updated_at":"2025-11-28T10:35:31.000Z","dependencies_parsed_at":"2023-11-24T22:23:46.874Z","dependency_job_id":"f2476826-c99e-4307-a0b7-02c90a481925","html_url":"https://github.com/rbenv/ruby-build","commit_stats":{"total_commits":1708,"total_committers":282,"mean_commits":6.056737588652482,"dds":0.8161592505854801,"last_synced_commit":"5a5358797d56405bec10371acc3b10af45b1847f"},"previous_names":["sstephenson/ruby-build"],"tags_count":306,"template":false,"template_full_name":null,"purl":"pkg:github/rbenv/ruby-build","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbenv%2Fruby-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbenv%2Fruby-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbenv%2Fruby-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbenv%2Fruby-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbenv","download_url":"https://codeload.github.com/rbenv/ruby-build/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbenv%2Fruby-build/sbom","scorecard":{"id":764055,"data":{"date":"2025-08-11","repo":{"name":"github.com/rbenv/ruby-build","commit":"3a666a1c2c4fa2fa52e6a71e4d817e417d44fa2a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":3,"reason":"Found 7/21 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yml:6","Info: topLevel 'contents' permission set to 'read': .github/workflows/differential-shellcheck.yml:12","Warn: topLevel 'security-events' permission set to 'write': .github/workflows/differential-shellcheck.yml:13","Info: topLevel 'contents' permission set to 'read': .github/workflows/mirror.yml:14","Info: topLevel 'contents' permission set to 'read': .github/workflows/release.yml:7","Warn: no topLevel permission defined: .github/workflows/update-ruby.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":10,"reason":"28 commit(s) and 9 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/rbenv/ruby-build/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/differential-shellcheck.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/rbenv/ruby-build/differential-shellcheck.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/differential-shellcheck.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/rbenv/ruby-build/differential-shellcheck.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/mirror.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/rbenv/ruby-build/mirror.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/rbenv/ruby-build/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/update-ruby.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/rbenv/ruby-build/update-ruby.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":9,"reason":"SAST tool is not run on all commits -- score normalized to 9","details":["Warn: 20 commits out of 21 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T00:15:48.482Z","repository_id":1025416,"created_at":"2025-08-23T00:15:48.482Z","updated_at":"2025-08-23T00:15:48.482Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27766773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-16T02:00:10.477Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","rbenv-plugin","ruby","version-manager"],"created_at":"2024-08-01T01:00:43.873Z","updated_at":"2026-04-12T14:04:05.691Z","avatar_url":"https://github.com/rbenv.png","language":"Shell","funding_links":[],"categories":["Required setup","Shell","hacktoberfest","Ruby"],"sub_categories":[],"readme":"# ruby-build\n\nruby-build is a command-line tool that simplifies installation of any Ruby version from source on Unix-like systems.\n\nIt is available as a plugin for [rbenv][] as the `rbenv install` command, or as a standalone program as the `ruby-build` command.\n\n## Installation\n\n### Homebrew package manager\n```sh\nbrew install ruby-build\n```\n\nUpgrade with:\n```sh\nbrew upgrade ruby-build\n```\n\n### Clone as rbenv plugin using git\n```sh\ngit clone https://github.com/rbenv/ruby-build.git \"$(rbenv root)\"/plugins/ruby-build\n```\n\nUpgrade with:\n```sh\ngit -C \"$(rbenv root)\"/plugins/ruby-build pull\n```\n\n### Install manually as a standalone program\n\nFirst, download a tarball from https://github.com/rbenv/ruby-build/releases/latest. Then:\n```sh\ntar -xzf ruby-build-*.tar.gz\nPREFIX=/usr/local ./ruby-build-*/install.sh\n```\n\n## Usage\n\n### Basic Usage\n\n```sh\n# As a standalone program\n$ ruby-build --list                        # lists latest stable releases for each Ruby\n$ ruby-build --definitions                 # lists all definitions, including outdated ones\n$ ruby-build 3.2.2 ~/.rubies/ruby-3.2.2    # installs Ruby 3.2.2\n$ ruby-build -d ruby-3.2.2 ~/.rubies       # alternate form for the previous example\n\n# As an rbenv plugin\n$ rbenv install 3.2.2  # installs Ruby 3.2.2 to ~/.rbenv/versions/3.2.2\n```\n\n\u003e [!WARNING]\n\u003e ruby-build mostly does not verify that system dependencies are present before downloading and attempting to compile Ruby from source. Please ensure that [all requisite libraries][build-env] such as build tools and development headers are already present on your system.\n\nBasically, what ruby-build does when installing a Ruby version is this:\n- Downloads an official tarball of Ruby source code;\n- Extracts the archive into a temporary directory on your system;\n- Executes `./configure --prefix=/path/to/destination` in the source code;\n- Runs `make install` to compile Ruby;\n- Verifies that the installed Ruby is functional.\n\nDepending on the context, ruby-build does a little bit more than the above: for example, it will try to link Ruby to the appropriate OpenSSL version, even if that means downloading and compiling OpenSSL itself; it will discover and link to Homebrew-installed instances of some libraries like libyaml and readline, etc.\n\n### Advanced Usage\n\n#### Custom Build Definitions\n\nTo install a version of Ruby that is not available in ruby-build, you can specify the path to a custom build definition file in place of a Ruby version number.\n\n```sh\n# As a standalone program\n$ ruby-build -d /path/to/3.4-custom /opt/rubies  # installs to /opt/rubies/3.4-custom\n\n# As an rbenv plugin\n$ rbenv install /path/to/3.4-custom              # installs to $(rbenv root)/versions/3.4-custom\n```\n\nYou can also provide a _directory_ of custom build definition files.\nThe path(s) will be searched along with ruby-build's bundled `share/ruby-build/` directory.\n(Perhaps a collection of 3rd-party build definitions published as a git repo,\nor an organization's custom build definitions distributed in-house.)\n\n```sh\n# As a standalone program\n$ RUBY_BUILD_DEFINITIONS=/path/to/custom/defs ruby-build --definitions              # lists all available versions of Ruby, including custom defs\n$ RUBY_BUILD_DEFINITIONS=/path/to/custom/defs ruby-build -d 3.5-custom /opt/rubies  # installs to /opt/rubies/3.5-custom\n\n# As an rbenv plugin\n$ RUBY_BUILD_DEFINITIONS=/path/to/custom/defs rbenv install --list                  # lists all available versions of Ruby, including custom defs\n$ RUBY_BUILD_DEFINITIONS=/path/to/custom/defs rbenv install 3.5-custom              # installs to $(rbenv root)/versions/3.5-custom\n```\n\nCheck out [default build definitions][definitions] as examples on how to write definition files.\n\n#### Custom Build Configuration\n\nThe build process may be configured through the following environment variables:\n\n| Variable                        | Function                                                                                         |\n| ------------------------------- | ------------------------------------------------------------------------------------------------ |\n| `TMPDIR`                        | Where temporary files are stored.                                                                |\n| `RUBY_BUILD_BUILD_PATH`         | Where sources are downloaded and built. (Default: a timestamped subdirectory of `TMPDIR`)        |\n| `RUBY_BUILD_CACHE_PATH`         | Where to cache downloaded package files. (Default: `~/.rbenv/cache` if invoked as rbenv plugin)  |\n| `RUBY_BUILD_HTTP_CLIENT`        | One of `aria2c`, `curl`, or `wget` to use for downloading. (Default: first one found in PATH)    |\n| `RUBY_BUILD_ARIA2_OPTS`         | Additional options to pass to `aria2c` for downloading.                                          |\n| `RUBY_BUILD_CURL_OPTS`          | Additional options to pass to `curl` for downloading.                                            |\n| `RUBY_BUILD_WGET_OPTS`          | Additional options to pass to `wget` for downloading.                                            |\n| `RUBY_BUILD_MIRROR_URL`         | Custom mirror URL root.                                                                          |\n| `RUBY_BUILD_MIRROR_PACKAGE_URL` | Custom complete mirror URL (e.g. http://mirror.example.com/package-1.0.0.tar.gz).                |\n| `RUBY_BUILD_SKIP_MIRROR`        | Bypass the download mirror and fetch all package files from their original URLs.                 |\n| `RUBY_BUILD_TARBALL_OVERRIDE`   | Override the URL to fetch the ruby tarball from, optionally followed by `#checksum`.             |\n| `RUBY_BUILD_DEFINITIONS`        | Colon-separated list of paths to search for build definition files.                              |\n| `RUBY_BUILD_ROOT`               | The path prefix to search for build definitions files. *Deprecated:* use `RUBY_BUILD_DEFINITIONS`|\n| `RUBY_BUILD_VENDOR_OPENSSL`     | Build and vendor openssl even if the system openssl is compatible                                |\n| `CC`                            | Path to the C compiler.                                                                          |\n| `RUBY_CFLAGS`                   | Additional `CFLAGS` options (_e.g.,_ to override `-O3`).                                         |\n| `CONFIGURE_OPTS`                | Additional `./configure` options.                                                                |\n| `MAKE`                          | Custom `make` command (_e.g.,_ `gmake`).                                                         |\n| `MAKE_OPTS` / `MAKEOPTS`        | Additional `make` options.                                                                       |\n| `MAKE_INSTALL_OPTS`             | Additional `make install` options.                                                               |\n| `RUBY_CONFIGURE_OPTS`           | Additional `./configure` options (applies only to Ruby source).                                  |\n| `RUBY_MAKE_OPTS`                | Additional `make` options (applies only to Ruby source).                                         |\n| `RUBY_MAKE_INSTALL_OPTS`        | Additional `make install` options (applies only to Ruby source).                                 |\n| `NO_COLOR`                      | Disable ANSI colors in output. The default is to use colors for output connected to a terminal.  |\n| `CLICOLOR_FORCE`                | Use ANSI colors in output even when not connected to a terminal.                                 |\n| `RUBY_REPO`                     | The URL of the git repository to use when building `ruby-dev`                                    |\n| `RUBY_REF`                      | The git branch (or revision) to use when building `ruby-dev`, e.g. `some-branch@af12decf`        |\n\n#### Applying Patches\n\nBoth `rbenv install` and `ruby-build` commands support the `-p/--patch` flag to apply a patch to the Ruby source code before building. Patches are read from standard input:\n\n```sh\n# applying a single patch\n$ rbenv install --patch 1.9.3-p429 \u003c /path/to/ruby.patch\n\n# applying a patch from HTTP\n$ rbenv install --patch 1.9.3-p429 \u003c \u003c(curl -sSL http://git.io/ruby.patch)\n\n# applying multiple patches\n$ cat fix1.patch fix2.patch | rbenv install --patch 1.9.3-p429\n```\n\n#### Checksum Verification\n\nAll Ruby definition files bundled with ruby-build include checksums for packages, meaning that all externally downloaded packages are automatically checked for integrity after fetching.\n\nSee the next section for more information on how to author checksums.\n\n#### Package Mirrors\n\nYou may specify a custom mirror by setting `RUBY_BUILD_MIRROR_URL`. When set,\nruby-build will first attempt to download packages from the mirror before falling\nback to the original URL.\n\n```sh\n# example:\nexport RUBY_BUILD_MIRROR_URL=\"https://my-mirror.example.com\"\ninstall_package \"ruby-2.6.5\" \"https://ruby-lang.org/ruby-2.6.5.tgz#\u003cSHA2\u003e\"\n# Will first try: https://my-mirror.example.com/\u003cSHA2\u003e\n```\n\nruby-build will first try to fetch this package from `$RUBY_BUILD_MIRROR_URL/\u003cSHA2\u003e`\n(note: this is the complete URL), where `\u003cSHA2\u003e` is the checksum for the file. It\nwill fall back to downloading the package from the original location if:\n- the package was not found on the mirror;\n- the mirror is down;\n- the download is corrupt, i.e. the file's checksum doesn't match;\n- no tool is available to calculate the checksum; or\n- `RUBY_BUILD_SKIP_MIRROR` is enabled.\n\nIf a mirror site doesn't conform to the above URL format, you can specify the\ncomplete URL by setting `RUBY_BUILD_MIRROR_PACKAGE_URL`. It behaves the same as\n`RUBY_BUILD_MIRROR_URL` except being a complete URL.\n\n#### Keeping the build directory after installation\n\nBoth `ruby-build` and `rbenv install` accept the `-k` or `--keep` flag, which\ntells ruby-build to keep the downloaded source after installation. This can be\nuseful if you need to use `gdb` and `memprof` with Ruby.\n\nSource code will be kept in a parallel directory tree `~/.rbenv/sources` when\nusing `--keep` with the `rbenv install` command. You should specify the\nlocation of the source code with the `RUBY_BUILD_BUILD_PATH` environment\nvariable when using `--keep` with `ruby-build`.\n\n## Getting Help\n\nPlease see the [ruby-build wiki][wiki] for solutions to common problems.\n\nIf you can't find an answer on the wiki, open an issue on the [issue tracker][].\nBe sure to include the full build log for build failures.\n\n\n  [rbenv]: https://github.com/rbenv/rbenv#readme\n  [definitions]: https://github.com/rbenv/ruby-build/tree/master/share/ruby-build\n  [wiki]: https://github.com/rbenv/ruby-build/wiki\n  [build-env]: https://github.com/rbenv/ruby-build/wiki#suggested-build-environment\n  [issue tracker]: https://github.com/rbenv/ruby-build/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbenv%2Fruby-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbenv%2Fruby-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbenv%2Fruby-build/lists"}