Forum: Ruby on Rails Ruby hangs when trying to install RubyGems

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
8f4bd55ed8419f6eb27994df50cdcc2d?d=identicon&s=25 John (Guest)
on 2007-02-07 23:46
(Received via mailing list)
I've just set up a minimal Gentoo install and emerged Ruby 1.8.5 from
portage. I then went to emerge rubygems, and found that it hangs.
Manually downloading the file and running 'ruby setup.rb' also hangs.
The following are the last few lines I get before nothing happens, and
my CPU sits at 100% (from Ruby):

Successfully built RubyGem
Name: sources
Version: 0.0.1
File: sources-0.0.1.gem

Any help would be great.
8f4bd55ed8419f6eb27994df50cdcc2d?d=identicon&s=25 John (Guest)
on 2007-02-08 00:03
(Received via mailing list)
A compilation from source makes no difference, either. Is this some
sort of unique Gentoo issue?
B786377a7b513c35f1e7296780a2b5a4?d=identicon&s=25 Philippe Le Rohellec (Guest)
on 2007-02-18 03:49
(Received via mailing list)
I had the same problem both with emerging rubygems or directly running
setup.rb from rubygems-0.9.2.tgz
I fixed it by patching rubygems-0.9.2/lib/rubygems/packages.rb:

<         if @io.respond_to? :seek
<           # avoid reading...
<  - entry.bytes_read, IO::SEEK_CUR)
<         else
>         #if @io.respond_to? :seek
>         #  # avoid reading...
>         # - entry.bytes_read, IO::SEEK_CUR)
>         #else
<         end
>         #end

With that patch you force the TarReader to actually read the file
rather than just seeking into it.
The bug was that by seeking, the bytes_read attribute of entry was
never updated.

This topic is locked and can not be replied to.