Project

General

Profile

Actions

Backport #4228

closed

Backward gemspec compatibility change in r29663 broke rake gems

Added by luislavena (Luis Lavena) over 13 years ago. Updated almost 13 years ago.

Status:
Closed
[ruby-core:34011]

Description

=begin
Hello,

In r29200, NARUSE committed my patch that corrected gemspec issues when attempt to install rake or any of the bundled gems (see [ruby-core:32165])

Problem is, in r29663, when backported for release, the old non-version gemspec are kept along the versioned ones, defeating the purpose of the previous fix.

Now, after installing a gem that was bundled, it breaks rake, again:

C:\Users\Luis>gem list

*** LOCAL GEMS ***

minitest (1.6.0)
rake (0.8.7)
rdoc (2.5.8)

C:\Users\Luis>rake -T
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2367:in raw_load_rakefile' C:/Ruby192/lib/ruby/1.9.1/rake.rb:2007:in block in load_rakefile'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2058:in standard_exception_handling' C:/Ruby192/lib/ruby/1.9.1/rake.rb:2006:in load_rakefile'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1991:in run' C:/Ruby192/bin/rake:31:in '

C:\Users\Luis>gem install rake
Successfully installed rake-0.8.7
1 gem installed

C:\Users\Luis>rake -T
C:/Ruby192/lib/ruby/1.9.1/rubygems.rb:340:in bin_path': can't find executable rake for rake-0.8.7 (Gem::Exception) from C:/Ruby192/bin/rake:19:in '

===

Please apply the following patch:

diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index ffac2bf..f690911 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -521,14 +521,6 @@ Gem::Specification.new do |s|
end
GEMSPEC
open_for_install(File.join(destdir, "#{name}-#{version}.gemspec"), $data_mode) { gemspec }

  • open_for_install(File.join(destdir, "#{name}.gemspec"), $data_mode) {
  •  <<-WARNING + gemspec
    

-# #{name}.gemspec remains just for compatibility with installation
-# before Ruby 1.9.2-p32.
-# This file will no longer exist in Ruby 1.9.3.
-# Refer #{name}-#{version}.gemspec instead.

  •  WARNING
    
  • }
    end
    end

To correct that issue.

Thank you.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0