[Rubygems-developers] Perennial Hang Problem with 'gem install rails'

Spolarich, Brian bspolarich at picometrix.com
Wed Jun 28 14:35:04 EDT 2006


  I've encountered a number of strange behaviours with ruby on my new
laptop, which I'd like to setup as a ruby dev envrionment.  Dual Core
Dell Latitude D620 running XPSP2 with 2GB RAM, patched, everything else
works fine.  I was able for example to install XAMPP (the Windows
packaged Apache/Mysql/PHP distribution) and am able to start MySQL and
Apache from the XAMPP control panel and access PHP applications.

  So one would think that I could run Ruby/Rails apps, such as with the
InstantRails package.  I am able to download and configure, but when I
attempt to access the rails apps running via WEBrick or Apache, I can
connect, but the application returns no output (e.g. telnet localhost
3000, "GET HTTP/1.0\n\n" returns nothing...it just hangs).  Windows
Firewall is disabled, no other firewall stuff installed, Windows
Defender disabled.

  So I decided to simplify things and downloaded the stock Ruby install
(both 1.8.2-15 and 1.8.4-17rc2).  In both cases when I attempt to run
'gem install rails', the gem program just hangs and doesn't do anything
(I mean for several hours it doesn't do anything).  Running 'ruby
-rtracer gem install railes --remote --include-dependencies >
outfile.txt' produces a lot of trace info (101K) that stops here (and
has been sitting here for a few hours):

[...snip...]
#0:C:/ruby/lib/ruby/1.8/net/http.rb:1267:Net::HTTPHeader:<:     end
#0:C:/ruby/lib/ruby/1.8/net/http.rb:1259:Array:>:         yield
capitalize(k), v.join(', ')
#0:C:/ruby/lib/ruby/1.8/net/http.rb:1259:Array:<:         yield
capitalize(k), v.join(', ')
#0:C:/ruby/lib/ruby/1.8/net/http.rb:1539:Net::HTTPGenericRequest:-:
buf << "#{k}: #{v}\r\n"
#0:C:/ruby/lib/ruby/1.8/net/http.rb:1539:String:>:         buf << "#{k}:
#{v}\r\n"
#0:C:/ruby/lib/ruby/1.8/net/http.rb:1539:String:<:         buf << "#{k}:
#{v}\r\n"
#0:C:/ruby/lib/ruby/1.8/net/http.rb:1259:Net::HTTPHeader:-:
yield capitalize(k), v.join(', ')
#0:C:/ruby/lib/ruby/1.8/net/http.rb:1265:Net::HTTPHeader:>:     def
capitalize(name)
#0:C:/ruby/lib/ruby/1.8/net/http.rb:1266:Net::HTTPHeader:-:
name.split(/-/).map {|s| s.capitalize }.join('-')
#0:C:/ruby/lib/ruby/1.8/net/http.rb:1266:String:>:       name.split(/

  My theory: something seems to be happening with ruby that's
interfering with socket connections.  'netstat -a' shows:

  Proto  Local Address          Foreign Address        State
  TCP    U-ARB-BSPOLARICH:http  U-ARB-BSPOLARICH:0  LISTENING
  TCP    U-ARB-BSPOLARICH:epmap  U-ARB-BSPOLARICH:0  LISTENING
  TCP    U-ARB-BSPOLARICH:https  U-ARB-BSPOLARICH:0  LISTENING
  TCP    U-ARB-BSPOLARICH:microsoft-ds  U-ARB-BSPOLARICH:0  LISTENING
  TCP    U-ARB-BSPOLARICH:1765  U-ARB-BSPOLARICH:0  LISTENING
  TCP    U-ARB-BSPOLARICH:1766  U-ARB-BSPOLARICH:0  LISTENING
  TCP    U-ARB-BSPOLARICH:3306  U-ARB-BSPOLARICH:0  LISTENING
  TCP    U-ARB-BSPOLARICH:5800  U-ARB-BSPOLARICH:0  LISTENING
  TCP    U-ARB-BSPOLARICH:5900  U-ARB-BSPOLARICH:0  LISTENING
  TCP    U-ARB-BSPOLARICH:10001  U-ARB-BSPOLARICH:0  LISTENING
  TCP    U-ARB-BSPOLARICH:10597  U-ARB-BSPOLARICH:0  LISTENING
  TCP    U-ARB-BSPOLARICH:1084  U-ARB-BSPOLARICH:0  LISTENING
  TCP    U-ARB-BSPOLARICH:1143  U-ARB-BSPOLARICH.:0  LISTENING
  TCP    U-ARB-BSPOLARICH:1188  localhost:1189         ESTABLISHED
  TCP    U-ARB-BSPOLARICH:1189  localhost:1188         ESTABLISHED
  TCP    U-ARB-BSPOLARICH:4664  U-ARB-BSPOLARICH:0  LISTENING
  TCP    U-ARB-BSPOLARICH:netbios-ssn  U-ARB-BSPOLARICH:0  LISTENING
  TCP    U-ARB-BSPOLARICH:netbios-ssn  U-ARB-BSPOLARICH:0  LISTENING
  TCP    U-ARB-BSPOLARICH:1096  apollo:netbios-ssn  ESTABLISHED
  TCP    U-ARB-BSPOLARICH:1106  zeus:microsoft-ds  ESTABLISHED
  TCP    U-ARB-BSPOLARICH:1221  zeus:1026  ESTABLISHED
  TCP    U-ARB-BSPOLARICH:1340  apollo:3389  ESTABLISHED
  TCP    U-ARB-BSPOLARICH:1374  192.168.1.2:3389       ESTABLISHED
  TCP    U-ARB-BSPOLARICH:1703  athena:14305  ESTABLISHED

  There was a connection to rubyforge.org but its gone now.  The ruby
shell process also does not respond to Control-C events.

  I have another laptop running a very similar set of utilities/services
that works fine.  But I like THIS machine. :-)

  I don't think there's a rails problem or perhaps even a gem problem.
This feels like a low-level problem.  Can someone suggest a test program
that would isolate the fault?  I've seen a fair number of reports on
various ruby-related lists of this exact problem, but no identification
of the fault or the solution are identified.

  I got my RoR book -- I want to get ruby-fied. :-)  Someone suggested
"use a *nix VM", which is an idea, but kind of a lame copout. 

  Any assistance is appreciated.

  -brian

--
Brian W. Spolarich ~ Manager, Information Services
  Advanced Photonix / Picometrix ~ 734-864-5618
            bspolarich at picometrix.com 
 


More information about the Rubygems-developers mailing list