Project

General

Profile

Actions

Bug #3462

closed

gem activation fails for native gems

Added by rogerdpack (Roger Pack) over 14 years ago. Updated about 12 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3dev (2010-06-19) [i386-mingw32]
Backport:

Description

=begin
C:\dev\digitalarchive_trunk>gem install ruby-prof
Successfully installed ruby-prof-0.8.1-x86-mingw32
1 gem installed

C:\dev\digitalarchive_trunk>irb

gem 'ruby-prof'
Gem::LoadError: Could not find RubyGem ruby-prof (>= 0)

     from <internal:gem_prelude>:186:in `push_gem_version_on_load_path'
     from <internal:gem_prelude>:16:in `gem'
     from (irb):1
     from c:/installs/ruby_trunk_installed/bin/irb.bat:20:in `<main>'

irb(main):002:0> $:.grep /ruby-prof/
=> ["c:/installs/ruby_trunk_installed/lib/ruby/gems/1.9.1/gems/ruby-prof-0.8.1-x86-mingw32/bin", "c:/installs/ruby_trunk_installed/lib/ruby/gems/1.9.1/gems/ruby-prof-0.8.1-x86-mingw32/lib"]

C:\dev\digitalarchive_trunk>ruby -v
ruby 1.9.3dev (2010-06-19) [i386-mingw32]

C:\dev\digitalarchive_trunk>gem -v
1.3.7
=end

Actions #1

Updated by mame (Yusuke Endoh) over 14 years ago

  • Assignee set to drbrain (Eric Hodel)

=begin

=end

Actions #2

Updated by mame (Yusuke Endoh) over 14 years ago

  • Target version set to 1.9.2

=begin
Hi,

This issue seems to be reproducible only on windows.
Unless anyone suggests any fix by today, this issue will be WONTFIX
for 1.9.2.

This is the last ticket that is a show stopper against 1.9.2 release.

--
Yusuke Endoh
=end

Actions #3

Updated by rogerdpack (Roger Pack) over 14 years ago

=begin
Yeah I wouldn't call this a high priority ticket.
=end

Actions #4

Updated by nobu (Nobuyoshi Nakada) over 14 years ago

=begin
gem_prelude.rb:push_all_highest_version_gems_on_load_path expects gem
directory names to be "#{GEMNAME}-#{VERSION}", but the native gem
directory name is suffixed by the platform name.

The following patch may help or may not.


diff --git a/gem_prelude.rb b/gem_prelude.rb
index 71f30bd..3be64aa 100644
--- a/gem_prelude.rb
+++ b/gem_prelude.rb
@@ -229,8 +229,12 @@ if defined?(Gem) then
Dir.entries(gems_directory).each do |gem_directory_name|
next if gem_directory_name == "." || gem_directory_name == ".."

  •          next unless gem_name = gem_directory_name[/(.*)-(.*)/, 1]
    
  •          next unless gem_name = gem_directory_name[/(.*)-(\d+(?:\.\d+)*)(?:-(.*))?/, 1]
             new_version = integers_for($2)
    
  •          if platform = $3
    
  •            require 'rubygems/platform'
    
  •            Gem::Platform.match(platform) or next
    
  •          end
             current_version = GemVersions[gem_name]
    
             if !current_version or (current_version <=> new_version) < 0 then
    

=end

Actions #5

Updated by mame (Yusuke Endoh) over 14 years ago

  • Assignee changed from drbrain (Eric Hodel) to ephoenix (Evan Phoenix)

=begin
Hi, Evan

This ticket is about gem_prelude.rb.
Do you think this should be fixed in 1.9.2?
And what do you think about nobu's patch?

--
Yusuke Endoh
=end

Actions #6

Updated by evanphx (Evan Phoenix) over 14 years ago

=begin

On Jul 20, 2010, at 6:25 AM, Yusuke Endoh wrote:

Issue #3462 has been updated by Yusuke Endoh.

Assigned to changed from Eric Hodel to Evan Phoenix

Hi, Evan

This ticket is about gem_prelude.rb.
Do you think this should be fixed in 1.9.2?
And what do you think about nobu's patch?

Nobu's patch is fine. It's a minor modification of my original patch for this issue. Nobu's patch was reverted from trunk because of the lazy sweep issue, as I recall.

If we can apply the patch to 1.9.2, we should.

  • Evan

--
Yusuke Endoh

http://redmine.ruby-lang.org/issues/show/3462


http://redmine.ruby-lang.org

=end

Actions #7

Updated by mame (Yusuke Endoh) over 14 years ago

=begin
Hi,

2010/7/21 Evan Phoenix :

Hi, Evan

This ticket is about gem_prelude.rb.
Do you think this should be fixed in 1.9.2?
And what do you think about nobu's patch?

Nobu's patch is fine. It's a minor modification of my original patch for this issue. Nobu's patch was reverted from trunk because of the lazy sweep issue, as I recall.

If we can apply the patch to 1.9.2, we should.

Thank you for your quick reply!

Did you get a commit bit? If you did, could you apply it to
trunk and check "make test-rubyspec" and "make check"?
If you see no problem, please commit it to trunk.

If no problem is reported in a few days, I'll backport it to
ruby_1_9_2.

--
Yusuke Endoh
=end

Actions #8

Updated by evanphx (Evan Phoenix) over 14 years ago

=begin

On Jul 20, 2010, at 9:32 AM, Yusuke Endoh wrote:

Issue #3462 has been updated by Yusuke Endoh.

Hi,

2010/7/21 Evan Phoenix :

Hi, Evan

This ticket is about gem_prelude.rb.
Do you think this should be fixed in 1.9.2?
And what do you think about nobu's patch?

Nobu's patch is fine. It's a minor modification of my original patch for this issue. Nobu's patch was reverted from trunk because of the lazy sweep issue, as I recall.

If we can apply the patch to 1.9.2, we should.

Thank you for your quick reply!

No problem!

Did you get a commit bit? If you did, could you apply it to
trunk and check "make test-rubyspec" and "make check"?
If you see no problem, please commit it to trunk.

Yep! I've got a commit bit now, I'll apply to trunk and commit it if it's fine.

If no problem is reported in a few days, I'll backport it to
ruby_1_9_2.

Wonderful!

--
Yusuke Endoh

http://redmine.ruby-lang.org/issues/show/3462


http://redmine.ruby-lang.org

=end

Actions #9

Updated by evanphx (Evan Phoenix) over 14 years ago

=begin
I've committed a slightly revised version of the patch that nobu and I worked on into trunk. It solves the gem activation issues because it loads all of rubygems to perform any gem activation.

Hopefully we can have this backported to 1.9.2 soon.

Thanks!

  • Evan

On Jul 20, 2010, at 9:34 AM, Evan Phoenix wrote:

On Jul 20, 2010, at 9:32 AM, Yusuke Endoh wrote:

Issue #3462 has been updated by Yusuke Endoh.

Hi,

2010/7/21 Evan Phoenix :

Hi, Evan

This ticket is about gem_prelude.rb.
Do you think this should be fixed in 1.9.2?
And what do you think about nobu's patch?

Nobu's patch is fine. It's a minor modification of my original patch for this issue. Nobu's patch was reverted from trunk because of the lazy sweep issue, as I recall.

If we can apply the patch to 1.9.2, we should.

Thank you for your quick reply!

No problem!

Did you get a commit bit? If you did, could you apply it to
trunk and check "make test-rubyspec" and "make check"?
If you see no problem, please commit it to trunk.

Yep! I've got a commit bit now, I'll apply to trunk and commit it if it's fine.

If no problem is reported in a few days, I'll backport it to
ruby_1_9_2.

Wonderful!

--
Yusuke Endoh

http://redmine.ruby-lang.org/issues/show/3462


http://redmine.ruby-lang.org

=end

Actions #10

Updated by rogerdpack (Roger Pack) over 14 years ago

=begin
Seems to work now. Since it doesn't pre-load $: with any gem lib paths anymore, probably quite a bit of gem_prelude could now be removed as well.

Thanks much.
-r
=end

Actions #11

Updated by mame (Yusuke Endoh) over 14 years ago

  • Status changed from Open to Closed

=begin
I've backported r28693, r28695 and r28703. Please check ruby_1_9_2.

We'll release RC3 within a few days (or weeks), and then 1.9.2-p0.

--
Yusuke Endoh
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0