# 使用 Homebrew, apk, chocolatey, apt, MacPorts, Nix, pacman, scoop, dnf 安装 jruby

查看 jruby 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:jruby
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install jruby
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install jruby
```

  证据: MacPorts ports tree: lang/jruby/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add jruby
```

  证据: Alpine Linux edge package indexes: jruby from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install jruby
```

  证据: Debian stable package indexes: jruby from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#jruby
```

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

- pacman (92%):

```sh
sudo pacman -S jruby
```

  证据: Arch Linux sync databases: jruby from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- dnf (92%):

```sh
sudo dnf install ast
```

  证据: Fedora Rawhide package metadata: ast from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install jruby
```

  证据: Chocolatey community package catalog: jruby from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','java7u13x86'

- Scoop (92%):

```sh
scoop install main/jruby
```

  证据: Scoop official bucket manifest trees: bucket/jruby.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:jruby
- **软件包管理器:** Homebrew
- **版本:** 10.1.1.0
- **来源摘要:** Ruby implementation in pure Java
- **主页:** <https://www.jruby.org/>
- **最后更新:** 2026-07-25T15:31:13+09:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- ast (别名)
- install_doc (别名)
- jbundle (别名)
- jbundler (别名)
- jerb (别名)
- jgem (别名)
- jirb (别名)
- jirb_swing (别名)
- jminitest (别名)
- jracc (别名)
- jrake (别名)
- jrdoc (别名)
- jri (别名)
- jruby (别名)
- jruby.sh (别名)
- jrubyc (别名)
- jsyntax_suggest (别名)
- jtest-unit (别名)
- lock_jars (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 10.1.1.0
## 项目历史与用法

JRuby is the long-running Ruby implementation for the Java Virtual Machine. It gives Ruby code access to Java classes, JVM deployment models, Java threading, and JVM tooling while preserving the Ruby language and much of the Ruby ecosystem.

### 项目历史

JRuby began in 2001 as a Java-hosted Ruby implementation and became one of the canonical examples of a dynamic language on the JVM. The project moved from a direct-port style implementation toward a JVM-oriented runtime with Java integration, bytecode compilation work, and compatibility targets that followed major Ruby language versions.

The project's institutional story is unusually visible for an open-source language runtime. Charles Nutter and Thomas Enebo announced in September 2006 that Sun Microsystems hired them to work on JRuby full time. After Sun, JRuby development continued through Engine Yard and then Red Hat involvement, keeping paid core development behind the runtime for many years.

### 采用历史

JRuby became important during the Ruby on Rails expansion because it made Ruby applications plausible inside Java shops that already standardized on JVM operations. A 2011 JRuby blog post describes the 2006 JavaOne Rails demo as a turning point, at a time when the JVM language conversation centered on projects such as Jython and Groovy.

Package-manager adoption reflects that maturity: JRuby appears across Homebrew, Debian/Ubuntu, Fedora-style distributions, MacPorts, Chocolatey, Scoop, Nix, Arch, and Alpine. For package maintainers it is both a Ruby runtime and a Java application, so packaging has to account for Ruby executables, Java dependencies, and RubyGems-facing commands.

### 使用方式

JRuby is used to run Ruby applications on the JVM, embed Ruby scripting into Java systems, call Java libraries from Ruby, and package Ruby applications for environments where the JVM is the operational baseline. Its command set includes JRuby-prefixed versions of common Ruby tools such as gem, irb, rake, rdoc, and ri.

### 为什么软件包爱好者会关心

JRuby is package-nerd catnip because it crosses ecosystem boundaries cleanly but not simply: Ruby code, Java bytecode, RubyGems, Maven-style expectations, native extension compatibility, and OS package managers all meet in one runtime. It is also a benchmark case for how language implementations survive outside their reference VM.

### 时间线

- 2001: JRuby project began as a Ruby implementation on the JVM.
- 2006: Sun Microsystems hired Charles Nutter and Thomas Enebo to work on JRuby full time.
- 2006: JRuby demonstrated Rails running on the JVM at JavaOne.
- 2009: JRuby core development moved from Sun to Engine Yard.
- 2012: Nutter and Enebo joined Red Hat to continue JRuby work.
- 2015: JRuby 9.0.0.0 moved the versioning line into Ruby 2.x compatibility.
- 2022: JRuby 9.4.0.0 targeted Ruby 3.1 compatibility.

### Related projects

- Related projects include MRI/CRuby, RubyGems, Rails, Jython, Groovy, TruffleRuby, Rubinius, and JVM dynamic-language work such as invokedynamic.

### 来源

- <https://blog.headius.com/2006/09/jruby-steps-into-sun.html>
- <https://blog.jruby.org/2011/09/bringing-jruby-to-the-cloud>
- <https://formulae.brew.sh/formula/jruby>
- <https://github.com/jruby/jruby>
- <https://github.com/jruby/jruby/wiki/AboutJRuby>
- <https://www.jruby.org/>
- <https://www.jruby.org/documentation>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Debian apt - jruby - 9.4.8.0+ds-3: normalized package name match | Debian stable package indexes: jruby from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | 100% pure-Java implementation of Ruby | https://jruby.org/
- Nix - jruby: normalized package name match | nixpkgs package indexes: jruby from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - jruby - 9.4.6.0+ds-1ubuntu3: normalized package name match | Ubuntu 24.04 LTS package indexes: jruby from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | 100% pure-Java implementation of Ruby | http://jruby.org/
- apk - jruby - 9.3.15.0-r0: normalized package name match | Alpine Linux edge package indexes: jruby from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | An implementation of Ruby on the JVM | https://www.jruby.org/
- apk - jruby-irb - 9.3.15.0-r0: normalized package name match | Alpine Linux edge package indexes: jruby-irb from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Interactive JRuby console | https://www.jruby.org/
- apk - jruby-libs - 9.3.15.0-r0: normalized package name match | Alpine Linux edge package indexes: jruby-libs from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | JRuby's standard libraries | https://www.jruby.org/
- apk - jruby-rake - 9.3.15.0-r0: normalized package name match | Alpine Linux edge package indexes: jruby-rake from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Ruby based make-like utility. | https://www.jruby.org/
- apk - jruby-rdoc - 9.3.15.0-r0: normalized package name match | Alpine Linux edge package indexes: jruby-rdoc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Ruby documentation tool | https://www.jruby.org/
- apk - jruby-readline - 9.3.15.0-r0: normalized package name match | Alpine Linux edge package indexes: jruby-readline from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Readline support for JRuby | https://www.jruby.org/
- apk - jruby-webrick - 9.3.15.0-r0: normalized package name match | Alpine Linux edge package indexes: jruby-webrick from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | HTTP server toolkit for JRuby | https://www.jruby.org/
- pacman - jruby - 10.1.1.0-1: normalized package name match | Arch Linux sync databases: jruby from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | 100% pure-Java implementation of the Ruby programming language | https://www.jruby.org/
- MacPorts - jruby: normalized package name match | MacPorts ports tree: lang/jruby/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - jruby: normalized package name match | Chocolatey community package catalog: jruby from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','java7u13x86'
- Scoop - main/jruby: normalized package name match | Scoop official bucket manifest trees: bucket/jruby.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- MacPorts - ast: installed executable or alias match | MacPorts ports tree: science/ast/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- dnf - ast - 9.2.12-5.fc45: installed executable or alias match | Fedora Rawhide package metadata: ast from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A Library for Handling World Coordinate Systems in Astronomy | http://starlink.eao.hawaii.edu/starlink/AST


## Combined YAML source

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


## 来源

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