macOS
brew install chrubylocal Homebrew formula metadata
sudo port install chrubyMacPorts ports tree · ruby/chruby/Portfile · 来源: api.github.com
安装
brew install chrubylocal Homebrew formula metadata
sudo port install chrubyMacPorts ports tree · ruby/chruby/Portfile · 来源: api.github.com
nix profile install nixpkgs#chrubynixpkgs package indexes · chruby · 来源: raw.githubusercontent.com
概览
Ruby environment tool
历史
chruby is a minimal shell-based Ruby version switcher that changes the active Ruby by updating shell environment variables instead of using shims.
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.
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.
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.
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.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
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.
Config paths the tool may read or write during local use.
~/.bashrc~/.zshrc/etc/bashrc/etc/profile.d/chruby.sh~/.bash_profile~/.zprofile.ruby-version~/.ruby-version可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
chruby-exec | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/postmodern/chruby
安装元数据
| 软件包键 | brew:chruby |
|---|---|
| 版本 | 0.3.9 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/chruby |
| 主页 | https://github.com/postmodern/chruby |
| 仓库 | https://github.com/postmodern/chruby |
| 上游文档 | https://github.com/postmodern/chruby#readme |
| 许可证 | MIT |
| 源码归档 | https://github.com/postmodern/chruby/releases/download/v0.3.9/chruby-0.3.9.tar.gz |
| Bottle | 可用 (于 all) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
| 注意事项 | 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 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | chruby |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
chruby
nix profile install nixpkgs#chrubychruby
sudo port install chruby来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.