Project

General

Profile

Actions

Bug #15407

closed

bundle, bundler, irb, rdoc, ri commands broken if --program-suffix configure option is used

Added by jeremyevans0 (Jeremy Evans) almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 2.6.0rc1 (2018-12-06 trunk 66253) [x86_64-openbsd]
[ruby-core:90463]

Description

With recent changes to tool/rbinstall.rb, if you use --program-suffix (or a similar option),
it will result in bundle, bundler, irb, rdoc, ri not working, because they try to load a
file from the gem directory which has been modified with the same suffix.

$ irb26
Traceback (most recent call last):
        1: from /usr/local/bin/irb26:23:in `<main>'
/usr/local/bin/irb26:23:in `load': cannot load such file -- /usr/local/lib/ruby/gems/2.6/gems/irb-0.9.6/exe/irb (LoadError)
$ rdoc26
Traceback (most recent call last):
        1: from /usr/local/bin/rdoc26:23:in `<main>'
/usr/local/bin/rdoc26:23:in `load': cannot load such file -- /usr/local/lib/ruby/gems/2.6/gems/rdoc-6.1.0.beta2/exe/rdoc (LoadError)
$ ri26
Traceback (most recent call last):
        1: from /usr/local/bin/ri26:23:in `<main>'
/usr/local/bin/ri26:23:in `load': cannot load such file -- /usr/local/lib/ruby/gems/2.6/gems/rdoc-6.1.0.beta2/exe/ri (LoadError)
$ bundler26
Traceback (most recent call last):
        1: from /usr/local/bin/bundler26:23:in `<main>'
/usr/local/bin/bundler26:23:in `load': cannot load such file -- /usr/local/lib/ruby/gems/2.6/gems/bundler-2.0.0/exe/bundler (LoadError)
$ bundle26
Traceback (most recent call last):
        1: from /usr/local/bin/bundle26:23:in `<main>'
/usr/local/bin/bundle26:23:in `load': cannot load such file -- /usr/local/lib/ruby/gems/2.6/gems/bundler-2.0.0/exe/bundle (LoadError)

These LoadErrors happen because ruby when configured with the --program-suffix option
installs the irb gem exe file as /usr/local/lib/ruby/gems/2.6/gems/irb-0.9.6/exe/irb26
(with similar issues for other default gems with executables).

Attached is a patch that modifies tool/rbinstall.rb so that the files in the gem directory
are not renamed on install. I'm not sure whether this patch causes other issues, but I can
confirm it does fix the problem described if --program-suffix is used.


Files

rbinstall.diff (739 Bytes) rbinstall.diff jeremyevans0 (Jeremy Evans), 12/13/2018 12:33 AM

Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #15339: CI - add checks for std-lib CLI ?Closedhsbt (Hiroshi SHIBATA)Actions

Updated by hsbt (Hiroshi SHIBATA) almost 6 years ago

  • Status changed from Open to Assigned
  • Assignee set to hsbt (Hiroshi SHIBATA)
Actions #2

Updated by naruse (Yui NARUSE) almost 6 years ago

  • Is duplicate of Bug #15339: CI - add checks for std-lib CLI ? added

Updated by naruse (Yui NARUSE) almost 6 years ago

  • Status changed from Assigned to Closed

It's fixed by r66384

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0