Fix gem bin PATH in ruby-arch base image #363

Closed
opened 2026-05-10 17:12:24 +00:00 by ldraney · 0 comments
Owner

Type

Bug

Context

Discovered during T3 validation (validation-360-2026-05-10). The ruby-arch base image installs bundler via gem install bundler, but Arch Linux's Ruby puts user-installed gem binaries in /root/.local/share/gem/ruby/3.4.0/bin/ instead of /usr/bin/. Running bundler without the full path fails with executable file not found in $PATH.

Expected Behavior

bundler (and any other gem-installed binaries) should be available in PATH.

Actual Behavior

bundler only works via full path: /root/.local/share/gem/ruby/3.4.0/bin/bundler.

Proposed Fix

Either:

  • Add ENV PATH="/root/.local/share/gem/ruby/3.4.0/bin:${PATH}" to the Dockerfile
  • Or use gem install --no-user-install bundler to install to /usr/bin/

The --no-user-install approach is more robust since it doesn't hardcode the Ruby version in the path.

Acceptance Criteria

  • docker run ... bundler --version works without specifying full path
  • docker run ... bundle --version also works
  • Downstream Dockerfiles (pal-enterprises) don't need PATH workarounds
### Type Bug ### Context Discovered during T3 validation (`validation-360-2026-05-10`). The `ruby-arch` base image installs bundler via `gem install bundler`, but Arch Linux's Ruby puts user-installed gem binaries in `/root/.local/share/gem/ruby/3.4.0/bin/` instead of `/usr/bin/`. Running `bundler` without the full path fails with `executable file not found in $PATH`. ### Expected Behavior `bundler` (and any other gem-installed binaries) should be available in PATH. ### Actual Behavior `bundler` only works via full path: `/root/.local/share/gem/ruby/3.4.0/bin/bundler`. ### Proposed Fix Either: - Add `ENV PATH="/root/.local/share/gem/ruby/3.4.0/bin:${PATH}"` to the Dockerfile - Or use `gem install --no-user-install bundler` to install to `/usr/bin/` The `--no-user-install` approach is more robust since it doesn't hardcode the Ruby version in the path. ### Acceptance Criteria - [ ] `docker run ... bundler --version` works without specifying full path - [ ] `docker run ... bundle --version` also works - [ ] Downstream Dockerfiles (pal-enterprises) don't need PATH workarounds
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/pal-e-platform#363
No description provided.