Skip to content

Ensure GEM_PATH always contains JRuby bundled gems#91

Merged
Sharpie merged 1 commit into
OpenVoxProject:mainfrom
Sharpie:ensure-bundled-gems
Jul 13, 2026
Merged

Ensure GEM_PATH always contains JRuby bundled gems#91
Sharpie merged 1 commit into
OpenVoxProject:mainfrom
Sharpie:ensure-bundled-gems

Conversation

@Sharpie

@Sharpie Sharpie commented Jul 13, 2026

Copy link
Copy Markdown
Member

Short description

The Ruby standard library is split into two pieces:

  • Default gems, which are installed directly into the $LOAD_PATH
    alongside core Ruby code.

  • Bundled gems, which are installed into a repository that the
    Gem library looks at by default.

JRuby ships the latter inside jruby-stdlib.jar, which can be
referenced be referenced by the following Java classloader URI:

uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared

This commit updates the logic for setting GEM_PATH to always append
the classloader URI to the end of any path configured by the
application. This ensures that the full JRuby standard library is
available by default, and that any updates from new JRuby versions are
automatically taken up.

Checklist

I have:

The Ruby standard library is split into two pieces:

  - Default gems, which are installed directly into the `$LOAD_PATH`
    alongside core Ruby code.

  - Bundled gems, which are installed into a repository that the
    `Gem` library looks at by default.

JRuby ships the latter inside `jruby-stdlib.jar`, which can be
referenced be referenced by the following Java classloader URI:

    uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared

This commit updates the logic for setting `GEM_PATH` to always append
the classloader URI to the end of any path configured by the
application. This ensures that the full JRuby standard library is
available by default, and that any updates from new JRuby versions are
automatically taken up.

Signed-off-by: Charlie Sharpsteen <charlie@overlookinfratech.com>
@Sharpie Sharpie merged commit 7c418f9 into OpenVoxProject:main Jul 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants