chruby
brew install chruby
v0.3.9
MIT
Ruby environment tool
445
30-day installs · #1868
1.4k
90-day · #1873
7.8k
365-day · #1597
2.9k
★ GitHub stars · updated 9mo ago
Links
- https://github.com/postmodern/chruby
- GitHub: postmodern/chruby
- Brew formula source: Formula/c/chruby.rb
Caveats
Add the following to the ~/.bash_profile or ~/.zshrc file: source $HOMEBREW_PREFIX/opt/chruby/share/chruby/chruby.sh To enable auto-switching of Rubies specified by .ruby-version files, add the following to ~/.bash_profile or ~/.zshrc: source $HOMEBREW_PREFIX/opt/chruby/share/chruby/auto.sh
Raw metadata
{
"aliases": [],
"alternatives": [],
"build_dependencies": [],
"categories": [],
"caveats": "Add the following to the ~/.bash_profile or ~/.zshrc file:\n source $HOMEBREW_PREFIX/opt/chruby/share/chruby/chruby.sh\n\nTo enable auto-switching of Rubies specified by .ruby-version files,\nadd the following to ~/.bash_profile or ~/.zshrc:\n source $HOMEBREW_PREFIX/opt/chruby/share/chruby/auto.sh\n",
"conflicts_with": [],
"dependencies": [],
"deprecated": 0,
"deprecation_reason": null,
"desc": "Ruby environment tool",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:36:23+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "chruby",
"github_default_branch": "master",
"github_last_commit_at": "2025-10-27T05:38:57Z",
"github_readme_excerpt": "# chruby\n\n[](https://github.com/postmodern/chruby/actions/workflows/shunit2.yml)\n\nChanges the current Ruby.\n\n## Features\n\n* Updates `$PATH`.\n * Also adds RubyGems `bin/` directories to `$PATH`.\n* Correctly sets `$GEM_HOME` and `$GEM_PATH`.\n * Users: gems are installed into `~/.gem/$ruby/$version`.\n * Root: gems are installed directly into `/path/to/$ruby/$gemdir`.\n* Additionally sets `$RUBY_ROOT`, `$RUBY_ENGINE`, `$RUBY_VERSION` and\n `$GEM_ROOT`.\n* Optionally sets `$RUBYOPT` if second argument is given.\n* Calls `hash -r` to clear the command-lookup hash-table.\n* Fuzzy matching of Rubies by name.\n* Defaults to the system Ruby.\n* Optionally supports auto-switching and the `.ruby-version` file.\n* Supports [bash] and [zsh].\n* Small (~100 LOC).\n* Has tests.\n\n## Anti-Features\n\n* Does not hook `cd`.\n* Does not install executable shims or require regenerating them after\n installing gems.\n* Does not require Rubies be installed into your home directory.\n* Does not automatically switch Rubies by default.\n* Does not require write-access to the Ruby directory in order to install gems.\n\n## Requirements\n\n* [bash] \u003e= 3 or [zsh]\n\n## Install\n\n```shell\nwget https://github.com/postmodern/chruby/releases/download/v0.3.9/chruby-0.3.9.tar.gz\ntar -xzvf chruby-0.3.9.tar.gz\ncd chruby-0.3.9/\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/chruby/releases/download/v0.3.9/chruby-0.3.9.tar.gz.asc\ngpg --verify chruby-0.3.9.tar.gz.asc chruby-0.3.9.tar.gz\n```\n\n### setup.sh\n\nchruby also includes a `setup.sh` script, which installs chruby. Simply run the \nscript as root or via `sudo`:\n\n```shell\nsudo ./scripts/setup.sh\n```\n\n### Homebrew\n\nchruby can also be installed with [homebrew]:\n\n```shell\nbrew install chruby\n```\n\nOr the a",
"github_repo": "postmodern/chruby",
"github_stars": 2913,
"github_topics": [],
"homepage": "https://github.com/postmodern/chruby",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": null,
"installs_30d": 445,
"installs_365d": 7753,
"installs_90d": 1397,
"keg_only": 0,
"keg_only_reason": null,
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "MIT",
"llm_generated_at": null,
"llm_model": null,
"name": "chruby",
"oldnames": [],
"one_liner": null,
"optional_dependencies": [],
"rank_30d": 1868,
"rank_365d": 1597,
"rank_90d": 1873,
"raw_hash": "e0b717b874790d73",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/c/chruby.rb",
"tap": "homebrew/core",
"test_dependencies": [],
"uses_from_macos": [],
"version_head": "HEAD",
"version_stable": "0.3.9",
"versioned_formulae": [],
"why_use_this": null
}