# Installer chruby avec Homebrew, MacPorts, Nix

Consultez les chemins d'installation, exécutables, métadonnées et notes de sécurité de chruby pour les workflows d'agents IA.

## installation

```sh
sudo av install brew:chruby
```

Commandes d'installation supplémentaires:

### macOS

- Homebrew (100%):

```sh
brew install chruby
```

  Preuve: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install chruby
```

  Preuve: MacPorts ports tree: ruby/chruby/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#chruby
```

  Preuve: nixpkgs package indexes: chruby from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

## Faits du paquet

- **Clé du paquet:** brew:chruby
- **Gestionnaire de paquets:** Homebrew
- **Version:** 0.3.9
- **Résumé source:** Ruby environment tool
- **Page d'accueil:** <https://github.com/postmodern/chruby>
- **Dépôt:** <https://github.com/postmodern/chruby>
- **Généré:** 2026-08-03T19:37:03+00:00

## exécutables

- chruby-exec (alias)

## Comportement d'installation

- Bouteille: non disponible

## Version et fraîcheur

- page générée: 2026-08-03
- version du gestionnaire: 0.3.9
## Historique du projet et usages

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

### Historique du projet

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.

### Historique d'adoption

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.

### Modes d'utilisation

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.

### Pourquoi les passionnés de paquets s'y intéressent

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.

### Chronologie

- 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.

### Sources

- <https://github.com/postmodern/chruby#readme>
- <https://api.github.com/repos/postmodern/chruby>
- <https://api.github.com/repos/postmodern/chruby/tags>
- <https://api.github.com/repos/postmodern/chruby/releases>


## Notes de sécurité

narrow executable package without higher-risk signals.

- **Risque Geiger:** vert / faible
- narrow executable package without higher-risk signals


## 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

- Unix: ~/.bashrc, ~/.zshrc, /etc/bashrc, /etc/profile.d/chruby.sh, ~/.bash_profile, ~/.zprofile, .ruby-version, ~/.ruby-version
## Autres enregistrements de gestionnaires de paquets

- Nix - chruby: normalized package name match | nixpkgs package indexes: chruby from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- MacPorts - chruby: normalized package name match | MacPorts ports tree: ruby/chruby/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/chruby.yml](https://github.com/mxcl/pkgdb/blob/main/combined/chruby.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
