Bug #15407
closedbundle, bundler, irb, rdoc, ri commands broken if --program-suffix configure option is used
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
Updated by hsbt (Hiroshi SHIBATA) almost 6 years ago
- Status changed from Open to Assigned
- Assignee set to hsbt (Hiroshi SHIBATA)
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