Automic VaultAutomic Vault

brew

Install chruby with Homebrew, MacPorts, Nix

Ruby environment tool. Version 0.3.9 via Homebrew; verified from local package data.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install chruby

local Homebrew formula metadata

MacPortsverified · 94%
sudo port install chruby

MacPorts ports tree · ruby/chruby/Portfile · source: api.github.com

overview

Package summary

Ruby environment tool

Commands and aliases

  • chruby-exec

history

Project history and usage

chruby is a minimal shell-based Ruby version switcher that changes the active Ruby by updating shell environment variables instead of using shims.

Project history

The GitHub repository was created in August 2012 and early tags begin with v0.0.1 on the same date. The README highlights a deliberately small design: update PATH and RubyGems environment variables, support bash and zsh, default to system Ruby, and keep the implementation around 100 lines.

chruby's README frames its design through anti-features: it does not hook cd by default, does not install executable shims, does not regenerate shims after gem installation, and does not require Rubies to live in the user's home directory.

Adoption history

The official README documents Homebrew installation, source installation, Arch AUR, Fedora Copr, FreeBSD ports, and pairing with ruby-install or ruby-build. The supplied package facts also show Homebrew, MacPorts, and Nix packaging.

How it is used

Users source chruby.sh from shell startup files and optionally source auto.sh to switch versions by reading .ruby-version files in the current or parent directories. Non-standard Ruby install directories can be appended to the RUBIES shell array.

Why package nerds care

chruby matters because it is the small-tool answer to heavier Ruby version managers. It plays well with package managers because it separates installing Ruby builds from selecting one in the shell, which keeps version switching inspectable and avoids shim directories.

Timeline

  • 2012: Repository created and v0.0.1 tag published.
  • 2012: v0.1.x releases established the shell-based switcher.
  • 2013: v0.3.x line matured around auto-switching and compatibility.
  • 2023: v0.3.9 released.
  • 2025: Repository metadata shows continued maintenance activity.

Related projects

  • Related projects include ruby-install, ruby-build, RVM, rbenv, rbfu, RubyGems, Bundler, JRuby, Rubinius, and MagLev.

security posture

Risk level: green

narrow executable package without higher-risk signals.

Risk classifier

green risk · low confidence · appliance

Why

  • narrow executable package without higher-risk signals

Signals

  • metadata:no-higher-risk-signals

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 1 platform targets.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

local files

Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.

Configuration files

Config paths the tool may read or write during local use.

Unix
~/.bashrc~/.zshrc/etc/bashrc/etc/profile.d/chruby.sh~/.bash_profile~/.zprofile.ruby-version~/.ruby-version

executables

Installed executables

CommandKindExposureNote
chruby-execcliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-07-08
manager version0.3.9
manager updated
local dataok
upstreamnot checked
latest detectednot detected

https://github.com/postmodern/chruby

install metadata

Package metadata

Package keybrew:chruby
Version0.3.9
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/chruby
Homepagehttps://github.com/postmodern/chruby
Repositoryhttps://github.com/postmodern/chruby
Upstream docshttps://github.com/postmodern/chruby#readme
LicenseMIT
Source archivehttps://github.com/postmodern/chruby/releases/download/v0.3.9/chruby-0.3.9.tar.gz
Bottleavailable (on all)
Homebrew post-installnot defined
Servicenone declared
CaveatsAdd 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

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namechruby
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Nix95%

chruby

nix profile install nixpkgs#chruby
  • normalized package name match
  • Matched by: Chruby
nixpkgs package indexes · raw.githubusercontent.com · nixpkgs package indexes: chruby from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
MacPorts95%

chruby

sudo port install chruby
  • normalized package name match
  • Matched by: Chruby
MacPorts ports tree · api.github.com · MacPorts ports tree: ruby/chruby/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment