Project

General

Profile

Bug #4485

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

Added by Erik Hollensbe over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
[ruby-core:<unknown>]

Description

=begin
Please see subject. You can see this evident in rubygems-test version 0.3.8 and lower, where bin_path 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 bin_path.
=end

rbinstall.rb.gem_executables.diff View (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 about 5 years ago

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

Revision 32608
Added by Eric Hodel about 5 years ago

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

Revision 32608
Added by Eric Hodel about 5 years ago

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

History

#1 [ruby-core:37464] Updated by Yui NARUSE about 5 years ago

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

#2 [ruby-core:37482] Updated by Hiroshi Nakamura about 5 years ago

  • Target version set to 1.9.3

#3 [ruby-core:37902] Updated by Eric Hodel about 5 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 [ruby-core:38305] Updated by Motohiro KOSAKI about 5 years ago

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

#5 [ruby-core:38336] Updated by Nobuyoshi Nakada about 5 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, bin_dir, :mode => $prog_mode)

Totally, it seems nice.
--
Nobu Nakada

#6 [ruby-core:38379] Updated by Eric Hodel about 5 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 [ruby-core:38380] Updated by Eric Hodel about 5 years ago

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

Also available in: Atom PDF