Bug #4485

Gem.bin_path('rake') does not return the path of the system-installed rake

Added by Erik Hollensbe about 3 years ago. Updated almost 3 years ago.

[ruby-core:<unknown>]
Status:Closed
Priority:Normal
Assignee:Eric Hodel
Category:-
Target version:1.9.3
ruby -v:- Backport:

Description

=begin
Please see subject. You can see this evident in rubygems-test version 0.3.8 and lower, where binpath is used to retrieve the rake path. In systems where a suffix is appended to the ruby version (e.g., ruby19/rake19/gem19), you will see that it is unable to locate the path via binpath.
=end

rbinstall.rb.gem_executables.diff Magnifier (2.04 KB) Eric Hodel, 07/09/2011 08:47 AM


Related issues

Related to ruby-trunk - Bug #5060: Executables in bin folder conflict with their gem versions. Assigned 07/20/2011

Associated revisions

Revision 32608
Added by Eric Hodel almost 3 years ago

  • tool/rbinstall.rb (default gems): Install executables into the fake gem dir for Gem.bin_path. [#4485]

History

#1 Updated by Yui NARUSE almost 3 years ago

  • Status changed from Open to Assigned
  • Assignee set to Eric Hodel

#2 Updated by Hiroshi Nakamura almost 3 years ago

  • Target version set to 1.9.3

#3 Updated by Eric Hodel almost 3 years ago

The attached patch adds executables to the stub gemspecs and installs a copy of bin/rake into the gem directory.

Can I have it reviewed?

#4 Updated by Motohiro KOSAKI almost 3 years ago

Nobu, please review Eric's patch soon. We don't have much time.

#5 Updated by Nobuyoshi Nakada almost 3 years ago

  • ruby -v changed from 1.9.2 to -

Hi,

At Sat, 9 Jul 2011 08:47:13 +0900,
Eric Hodel wrote in :

The attached patch adds executables to the stub gemspecs and installs a copy of bin/rake into the gem directory.

It seems a half of the path is unconcerned in this issue but
just renaming of a local variable, right?

In the last part, it could be simply:

execs = execs.map {|exec| File.join(srcdir, 'bin', exec)}
install(execs, bindir, :mode => $progmode)

Totally, it seems nice.
--
Nobu Nakada

#6 Updated by Eric Hodel almost 3 years ago

The install of tool/rbinstall.rb only allows one source item per call so I couldn't take full advantage of your suggestion.

#7 Updated by Eric Hodel almost 3 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF