{"id":13484030,"url":"https://github.com/postmodern/ruby-install","last_synced_at":"2025-05-13T19:02:48.107Z","repository":{"id":7094247,"uuid":"8385515","full_name":"postmodern/ruby-install","owner":"postmodern","description":"Installs Ruby, JRuby, TruffleRuby, or mruby","archived":false,"fork":false,"pushed_at":"2025-05-06T02:26:24.000Z","size":1234,"stargazers_count":1934,"open_issues_count":46,"forks_count":258,"subscribers_count":54,"default_branch":"master","last_synced_at":"2025-05-06T03:27:28.158Z","etag":null,"topics":["bash-script","bash-utility","installer","jruby","mruby","rubies","ruby","ruby-builder","ruby-install","ruby-installer","truffleruby"],"latest_commit_sha":null,"homepage":"","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/postmodern.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"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},"funding":{"github":"postmodern"}},"created_at":"2013-02-24T02:50:09.000Z","updated_at":"2025-05-04T22:15:11.000Z","dependencies_parsed_at":"2023-02-18T14:46:08.012Z","dependency_job_id":"4abf5165-36c8-4778-9a6f-bc9464dc2ad1","html_url":"https://github.com/postmodern/ruby-install","commit_stats":{"total_commits":1143,"total_committers":61,"mean_commits":"18.737704918032787","dds":"0.18635170603674545","last_synced_commit":"ecd2ee581da6b20b4a8c592394a2081277bf4e8d"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postmodern%2Fruby-install","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postmodern%2Fruby-install/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postmodern%2Fruby-install/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postmodern%2Fruby-install/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/postmodern","download_url":"https://codeload.github.com/postmodern/ruby-install/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254010792,"owners_count":21998993,"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","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":["bash-script","bash-utility","installer","jruby","mruby","rubies","ruby","ruby-builder","ruby-install","ruby-installer","truffleruby"],"created_at":"2024-07-31T17:01:18.278Z","updated_at":"2025-05-13T19:02:48.052Z","avatar_url":"https://github.com/postmodern.png","language":"Shell","funding_links":["https://github.com/sponsors/postmodern"],"categories":["Shell","Environment Management","Web 后端"],"sub_categories":[],"readme":"# ruby-install\n\nInstalls [Ruby], [JRuby], [TruffleRuby] (native / GraalVM), or [mruby].\n\n## Features\n\n* Supports downloading the latest versions and checksums from [ruby-versions].\n* Supports installing into `/opt/rubies/` for root and `~/.rubies/` for users\n  by default.\n* Supports installing into arbitrary directories.\n* Supports downloading from arbitrary URLs.\n* Supports downloading from mirrors.\n* Supports downloading/applying patches.\n* Supports passing in arbitrary `./configure` options.\n* Supports downloading archives using `wget` or `curl`.\n* Supports verifying downloaded archives via MD5, SHA1, SHA256 or SHA512\n  checksums.\n* Supports installing build dependencies from the package manager\n  ([apt], [dnf], [yum], [pacman], [zypper], [xbps], [brew], [macports], and\n  [pkg]).\n* Supports many different OSes:\n  * Linux\n    * [Ubuntu]\n    * [Debian]\n    * [Fedora]\n    * [OpenSUSE]\n    * [Arch Linux]\n    * [Void Linux]\n  * [macOS]\n  * [FreeBSD]\n* Has unit tests.\n\n## Anti-Features\n\n* Does not require upgrading every time a new Ruby version comes out.\n* Does not require recipes for each individual Ruby version or configuration.\n* Does not support installing trunk/HEAD or nightly rolling releases.\n* Does not support installing unsupported/unmaintained versions of Ruby.\n\n## Requirements\n\n* [bash] \u003e= 3.x\n* `grep`\n* [wget] \u003e 1.12 or [curl]\n* `md5sum` or `md5`\n* `sha1sum` or `sha1`\n* `sha256sum` or `sha256`\n* `sha512sum` or `sha512`\n* `tar`\n* `bzip2`\n* `xz`\n* `patch` (if `--patch` is specified)\n* [gcc] \u003e= 4.2 or [clang]\n\n## Synopsis\n\nList supported Rubies and their current stable versions:\n\n```shell\n$ ruby-install\n```\n\nUpdates then list the supported Rubies and their current stable versions:\n\n```shell\n$ ruby-install --update\n```\n\nInstall the current stable version of Ruby:\n\n```shell\n$ ruby-install ruby\n```\n\nInstall the latest version of Ruby:\n\n```shell\n$ ruby-install --update ruby\n```\n\nInstall a stable version of Ruby:\n\n```shell\n$ ruby-install ruby 3.1\n```\n\nInstall a specific version of Ruby:\n\n```shell\n$ ruby-install ruby 3.1.2\n```\n\nInstall a Ruby into a specific directory:\n\n```shell\n$ ruby-install --install-dir /path/to/dir ruby\n```\n\nInstall a Ruby into a specific `rubies` directory:\n\n```shell\n$ ruby-install --rubies-dir /path/to/rubies/ ruby\n```\n\nInstall a Ruby into `/usr/local`:\n\n```shell\n$ sudo ruby-install --system ruby 3.1.2\n```\n\nInstall a Ruby from a mirror:\n\n```shell\n$ ruby-install -M http://www.mirrorservice.org/sites/ftp.ruby-lang.org/pub/ruby ruby 3.1.2\n```\n\nInstall a Ruby with a specific patch:\n\n```shell\n$ ruby-install -p https://raw.github.com/gist/4136373/falcon-gc.diff ruby 1.9.3-p551\n```\n\nInstall a Ruby with a specific C compiler:\n\n```shell\n$ ruby-install ruby 3.1.2 -- CC=clang\n```\n\nInstall a Ruby with specific configuration:\n\n```shell\n$ ruby-install ruby 3.1.2 -- --enable-shared --enable-dtrace CFLAGS=\"-O3\"\n```\n\nInstall CRuby with jemalloc support:\n\n```shell\n$ ruby-install ruby 3.1.2 -- --with-jemalloc\n```\n\nInstall CRuby with YJIT support:\n\n```shell\n$ ruby-install ruby 3.2.0 -- --enable-yjit\n```\n\nInstall a Ruby without installing dependencies first:\n\n```shell\n$ ruby-install --no-install-deps ruby 3.1.2\n```\n\nUninstall a Ruby version:\n\n```shell\n$ rm -rf ~/.rubies/ruby-3.1.2\n```\n\n### Integration\n\nUsing ruby-install with [RVM]:\n\n```shell\n$ ruby-install --rubies-dir ~/.rvm/rubies ruby-3.2.0-preview3\n```\n\nUsing ruby-install with [rbenv]:\n\n```shell\n$ ruby-install --install-dir ~/.rbenv/versions/3.2.0-preview3 ruby-3.2.0-preview3\n```\n\nruby-install can even be used with [Chef].\n\n## Install\n\n```shell\nwget https://github.com/postmodern/ruby-install/releases/download/v0.10.1/ruby-install-0.10.1.tar.gz\ntar -xzvf ruby-install-0.10.1.tar.gz\ncd ruby-install-0.10.1/\nsudo make install\n```\n\n### PGP\n\nAll releases are [PGP] signed for security. Instructions on how to import my\nPGP key can be found on my [blog][1]. To verify that a release was not tampered\nwith:\n\n```shell\nwget https://github.com/postmodern/ruby-install/releases/download/v0.10.1/ruby-install-0.10.1.tar.gz.asc\ngpg --verify ruby-install-0.10.1.tar.gz.asc ruby-install-0.10.1.tar.gz\n```\n\n### Homebrew\n\nruby-install can also be installed with [homebrew]:\n\n```shell\nbrew install ruby-install\n```\n\nOr the absolute latest ruby-install can be installed from source:\n\n```shell\nbrew install ruby-install --HEAD\n```\n\n### Arch Linux\n\nruby-install is already included in the [AUR]:\n\n```shell\nyaourt -S ruby-install\n```\n\n### Fedora Linux\n\nruby-install is available on [Fedora Copr](https://copr.fedorainfracloud.org/coprs/duritong/chruby/).\n\n### FreeBSD\n\nruby-install is included in the official [FreeBSD ports collection]:\n\n```shell\ncd /usr/ports/devel/ruby-install/ \u0026\u0026 make install clean\n```\n\n## Known Issues\n\nPlease see the [wiki](https://github.com/postmodern/ruby-install/wiki/Known-Issues).\n\n## Alternatives\n\n* [RVM]\n* [ruby-build]\n\n## Endorsements\n\n\u003e I like the approach you're taking. Curious to see how it plays out.\n\n-- [Sam Stephenson](https://twitter.com/sstephenson/status/334461494668443649)\nof [rbenv]\n\n[ruby-versions]: https://github.com/postmodern/ruby-versions#readme\n\n[Ruby]: https://www.ruby-lang.org/\n[JRuby]: https://jruby.org/\n[TruffleRuby]: https://github.com/oracle/truffleruby\n[mruby]: https://github.com/mruby/mruby#readme\n\n[Ubuntu]: https://ubuntu.com/\n[Debian]: https://www.debian.org/\n[Fedora]: https://fedoraproject.org/\n[OpenSUSE]: https://www.opensuse.org/\n[Arch Linux]: https://archlinux.org/\n[Void Linux]: https://voidlinux.org/\n[macOS]: https://www.apple.com/macos/\n[FreeBSD]: https://www.freebsd.org/\n\n[apt]: https://wiki.debian.org/Apt\n[dnf]: https://fedoraproject.org/wiki/Features/DNF\n[yum]: http://yum.baseurl.org/\n[pacman]: https://wiki.archlinux.org/index.php/Pacman\n[zypper]: https://en.opensuse.org/Portal:Zypper\n[xbps]: https://docs.voidlinux.org/xbps/index.html\n[pkg]: https://wiki.freebsd.org/pkgng\n[macports]: https://www.macports.org/\n[brew]: https://brew.sh\n\n[bash]: https://www.gnu.org/software/bash/\n[wget]: https://www.gnu.org/software/wget/\n[curl]: https://curl.se/\n\n[gcc]: https://gcc.gnu.org/\n[clang]: https://clang.llvm.org/\n\n[RVM]: https://rvm.io/\n[rbenv]: https://github.com/sstephenson/rbenv#readme\n[ruby-build]: https://github.com/sstephenson/ruby-build#readme\n[Chef]: https://github.com/rosstimson/chef-ruby_install#readme\n\n[PGP]: https://en.wikipedia.org/wiki/Pretty_Good_Privacy\n[1]: https://postmodern.github.io/pgp/\n\n[homebrew]: https://brew.sh/\n[AUR]: https://aur.archlinux.org/packages/ruby-install/\n[FreeBSD ports collection]: https://www.freshports.org/devel/ruby-install/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostmodern%2Fruby-install","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpostmodern%2Fruby-install","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostmodern%2Fruby-install/lists"}