Bug #3805

Ruby generated gem specifications for bundled projects are incorrect

Added by Luis Lavena over 3 years ago. Updated almost 3 years ago.

[ruby-core:32165]
Status:Closed
Priority:Normal
Assignee:-
Category:build
Target version:2.0.0
ruby -v:ruby 1.9.3dev (2010-09-09 trunk 29199) [x86_64-darwin10.4.0] Backport:

Description

=begin
Hello,

One porblem with found with Ruby 1.9.2 and current trunk is that during installation, the generated gem specifications are incomplete and lack the versioned file information needed for a successful gem install.

One common problem is the installation of rake itself. See the following git for the full list of commands:

http://gist.github.com/570419

After doing gem install rake, rake doesn't work:

$ rake --version
rake, version 0.8.7

$ gem install rake
Successfully installed rake-0.8.7
1 gem installed

$ rake --version
/Users/luis/.portile/apps/x86_64-apple-darwin10.4.0/ruby/1.9.3-trunk/lib/ruby/1.9.1/rubygems.rb:340:in bin_path': can't find executable rake for rake-0.8.7 (Gem::Exception)
from /Users/luis/.portile/apps/x86_64-apple-darwin10.4.0/ruby/1.9.3-trunk/bin/rake:19:in
'

This issue is solved by removing the non-versioned .gemspec files (or actually renaming them with version.

Attached is a patch that adds the version to the gemspec in rbinstall script.

With it applied:

$ rake --version
/Users/luis/.portile/apps/x8664-apple-darwin10.4.0/ruby/1.9.3-trunk/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake/altsystem.rb:32: Use RbConfig instead of obsolete and deprecated Config.
rake, version 0.8.7

This change should also be backported into 1.9.2 branch.

Thank you.
=end

0001-version-bundled-gems-during-installation.patch Magnifier (615 Bytes) Luis Lavena, 09/09/2010 02:40 AM

History

#1 Updated by Yui NARUSE over 3 years ago

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

=begin
This issue was solved with changeset r29200.
Luis, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

#2 Updated by Nobuyoshi Nakada over 3 years ago

=begin
Hi,

At Thu, 9 Sep 2010 02:41:01 +0900,
Luis Lavena wrote in :

One common problem is the installation of rake itself. See
the following git for the full list of commands:

http://gist.github.com/570419

After doing gem install rake, rake doesn't work:

$ rake --version
rake, version 0.8.7

$ gem install rake
Successfully installed rake-0.8.7
1 gem installed

Why does gem command try to install another rake, even when the
same version is installed already?

--
Nobu Nakada

=end

#3 Updated by Luis Lavena over 3 years ago

=begin
2010/9/11 Nobuyoshi Nakada nobu@ruby-lang.org:

Hi,

At Thu, 9 Sep 2010 02:41:01 +0900,
Luis Lavena wrote in :

One common problem is the installation of rake itself. See
the following git for the full list of commands:

http://gist.github.com/570419

After doing gem install rake, rake doesn't work:

$ rake --version
rake, version 0.8.7

$ gem install rake
Successfully installed rake-0.8.7
1 gem installed

Why does gem command try to install another rake, even when the
same version is installed already?

AFAIK this has been how RubyGems behave for quite some time, and mimic
the pristine command too, which uses the cached .gem

However, it should be attempting to install it, so I think a bug
report should be addressed in RubyGems and then merged back into Ruby.

http://gist.github.com/575482

Anyhow, the bug report I open up is not about that, the versions been
the same is just a coincidence. I could have pick rdoc as better
example.

--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

=end

Also available in: Atom PDF