RubyGems or any HTTP on XP NOT working

M

mycallidus

I tried to start learning Ruby by installing Ruby & Rails on XP, and it
has been very frustrating so far. Any remote gem installs failed at
the following step,

Updating Gem source index for: http://gems.rubyforge.org

It seems to me a very common problem on XP since the same problem
occurs on 3 different XP machines, XP Home SP1, XP Pro SP1, and XP Pro
SP2. However, I couldn't find any answers to this problem after
googling many hours on the net. Someone mentioned that it is related
to ZoneAlarm, but I do not have that on any of the XP machines. Two XP
boxes use my home network, and the other one is my office machine.
None of them uses a proxy for Internet access. The following simple
test program also hangs on these machines,

require 'net/http'
puts 'connecting...'
Net::HTTP.start('www.google.com') do |http|
response = http.get('/index.html')
puts response.code
end

The internal HTTP server comes with Rails also hangs and does not
respond to any browser requests. I could not Ctrl-C to kill the
process either. The problem was finally resolved by using my old NT
machine on the same home network which the other two XP share. "gem
update --system" and "gem install rails" all worked smoothly w/o any
problems. The test program also ran and displayed the response code
right away. Rails HTTP server works perfectly as well. I don't use
my NT machine nowadays, so it would be very cumbersome to try out rails
on that machine every time. It will be really appreciated if someone
can help me out here.

Thanks,
Barry
 
C

Christopher Aldridge

Use Ctrl + Break instead of Ctrl + C

I'll let someone else respond regarding the other stuff as I'm not 100% sur=
e.
 
K

Kevin Olbrich

I've been working smoothly on an XP machine with none of the problems =
you
report.
XP added an internal firewall sometime back, perhaps it is turned on.

Another possibility is that your home networking router is blocking =
things.
Some cable/dsl modems also have built-in firewalls that can sometimes =
act
up.

Are there any unusual programs common to all 3 machines?

Can you ping gems.rubyforge.org? If not, try doing a tracert to see =
where
it is failing.

_Kevin=20

-----Original Message-----
From: (e-mail address removed) [mailto:[email protected]]=20
Sent: Sunday, August 14, 2005 07:11 PM
To: ruby-talk ML
Subject: RubyGems or any HTTP on XP NOT working


I tried to start learning Ruby by installing Ruby & Rails on XP, and it =
has
been very frustrating so far. Any remote gem installs failed at the
following step,

Updating Gem source index for: http://gems.rubyforge.org

It seems to me a very common problem on XP since the same problem occurs =
on
3 different XP machines, XP Home SP1, XP Pro SP1, and XP Pro SP2. =
However,
I couldn't find any answers to this problem after googling many hours on =
the
net. Someone mentioned that it is related to ZoneAlarm, but I do not =
have
that on any of the XP machines. Two XP boxes use my home network, and =
the
other one is my office machine. None of them uses a proxy for Internet
access. The following simple test program also hangs on these machines,

require 'net/http'
puts 'connecting...'
Net::HTTP.start('www.google.com') do |http|
response =3D http.get('/index.html')
puts response.code
end

The internal HTTP server comes with Rails also hangs and does not =
respond to
any browser requests. I could not Ctrl-C to kill the process either. =
The
problem was finally resolved by using my old NT machine on the same home
network which the other two XP share. "gem update --system" and "gem
install rails" all worked smoothly w/o any problems. The test program =
also
ran and displayed the response code right away. Rails HTTP server works
perfectly as well. I don't use my NT machine nowadays, so it would be =
very
cumbersome to try out rails on that machine every time. It will be =
really
appreciated if someone can help me out here.

Thanks,
Barry
 
M

mycallidus

Everything works fine on the old NT which is in the same network as the
other two XP box. I even tried an XP in my office which is in a
totally different network and got the same result. Same behavior with
both the latest 1.8.2-15 and 1.8.2-14 Final on all XP boxes after
several install/uninstalling.
 
M

mycallidus

Both Ctrl-C and Ctrl-Break work if no browser requests to the server
yet. I use the following command to start the Rails HTTP server,

ruby script/server

I can terminate it with either Ctrl-C or Ctrl-Break before using the
brower to access the server at http://localhost:3000. Once the request
is in, the server seems to be hanging and has no response to Ctrl-C nor
Ctrl-Break. This is the same behavior when RubyGems is trying to
connect to a remote server. The only way to stop the HTTP server or
RubyGems is by closing the DOS window.

Barry
 
E

Ezra Zygmuntowicz

I think you have run into the XP firewall problem. The same thing has
happened to a few people before and it has usually been a Zone Alarm
compatability issue. You need to uninstall Zone Alarm or any other
software firewall you have installed. Turning it off will not be
enough you need to completely uninstall it. Zone ALarm and a few
other firewalls on XP interfere with ruby's socket access and causes
the problem you are seeing. Try to uninstall your firewall and try it
again. I know it sucks because xp really needs a firewall but thats
the current state of the issue. Search this list and you will find
other threads about this same subject. Some of them have suggestions
for other firewalls that work with ruby and XP.

HTH-
-Ezra Zygmuntowicz
WebMaster
Yakima Herald-Republic Newspaper
(e-mail address removed)
509-577-7732
 
B

barry

Ezra, Thanks for you response. That's also the closest answer I could
find in the first place. However, I don't have Zone Alarm installed on
any of the XP. The one I use at home primarily is XP Home with SP1,
and it doesn't have Microsoft's Firewall either. My office machine is
XP Pro with SP2, and it does have Microsoft's Firewall that probably
comes with SP2. When I clicked on the "Firewall" icon in control
panel, XP asked me if I want to enable it. I doubt it's running at
all.

Anyway, I thought it should be a common problem Windows XP people would
run into since it occurred on three different XP for me. Someone
should have already come up with a solution or workaround if it's such
a common problem for XP. I can try to uninstall any programs that
could prevent socket from working for Ruby if someone can shed some
lights on what program it would be.
 
D

daz

Barry said:
I can try to uninstall any programs that could prevent
socket from working for Ruby if someone can shed some
lights on what program it would be.


Hi Barry,

Any chance you could grab this ?:

http://www.sysinternals.com/Utilities/ProcessExplorer.html ZIP - 554KB

There's no installation to do - just unzip to a new folder.

(It displays running processes and handles in use
- including sockets, mutexes, etc.)

Close any applications not in use, then:

1) Start procexp.exe [PX below]
2) Start your simple Ruby test prog and leave it hanging ...
3) [PX] Click on the Ruby.exe process line in the top pane
4) [PX] Ctrl + H (View menu -> Lower Pane View -> Handles)
5) [PX] Ctrl + A (File menu -> Save As ...) pxrb.txt
- done -

Check pxrb.txt for personal info
(sometimes appears on title bar of email client)

I was going to suggest you post it here but the output is tabbed.
If you mail it to me, I can format and upload it somewhere visible
for folks here. [ daz (at) d10.karoo.co.uk ]

I don't have XP, so that's probably all I can help with.


daz
 
B

Brock Weaver

------=_Part_13504_6490596.1124113655607
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Have you tried telnetting into your WEBrick server instead of using the=20
browser? Maybe IE isn't performing the request correctly...

telnet
set localecho
open 127.0.0.1 <http://127.0.0.1> 3000

GET /index.html HTTP/1.1


(note the screen doesn't clear after you do the "open" command, but the=20
cursor will move to the top)

Also note you need to hit <enter> twice after the GET command (standard htt=
p=20
rules)

If it works, you should get a mess of HTML on your screen, and your server=
=20
will show something like:

127.0.0.1 <http://127.0.0.1> - - [15/Aug/2005:08:43:05 Central Daylight=20
Time] "GET /index.html HTTP/1.1" 200 3234
- -> /index.html


Also, have you tried hitting other local web servers (like apache or IIS)?=
=20
If those won't work either, it's probably a system problem -- aka bad proxy=
=20
settings, your HOSTS file has a non-127.0.0.1 mapping for localhost, etc.=
=20
Since you said you don't have any firewalls running, that's about all the=
=20
situations I can think of...


=20
=20
Barry wrote:
=20
I can try to uninstall any programs that could prevent
socket from working for Ruby if someone can shed some
lights on what program it would be.
=20
=20
Hi Barry,
=20
Any chance you could grab this ?:
=20
http://www.sysinternals.com/Utilities/ProcessExplorer.html ZIP - 554KB
=20
There's no installation to do - just unzip to a new folder.
=20
(It displays running processes and handles in use
- including sockets, mutexes, etc.)
=20
Close any applications not in use, then:
=20
1) Start procexp.exe [PX below]
2) Start your simple Ruby test prog and leave it hanging ...
3) [PX] Click on the Ruby.exe process line in the top pane
4) [PX] Ctrl + H (View menu -> Lower Pane View -> Handles)
5) [PX] Ctrl + A (File menu -> Save As ...) pxrb.txt
- done -
=20
Check pxrb.txt for personal info
(sometimes appears on title bar of email client)
=20
I was going to suggest you post it here but the output is tabbed.
If you mail it to me, I can format and upload it somewhere visible
for folks here. [ daz (at) d10.karoo.co.uk <http://d10.karoo.co.uk> ]
=20
I don't have XP, so that's probably all I can help with.
=20
=20
daz
=20
=20
=20
=20
=20


--=20
Brock Weaver
http://www.circaware.com

------=_Part_13504_6490596.1124113655607--
 
B

Barry

Here's result:

Process PID CPU Description Company Name
System Idle Process 0 98.48
explorer.exe 1444 0.76 Windows Explorer Microsoft Corporation
ccApp.exe 2692 Common Client User Session Symantec Corporation
ctfmon.exe 2952 CTF Loader Microsoft Corporation
cmd.exe 5496 Windows Command Processor Microsoft Corporation
ruby.exe 4480 Ruby interpreter
procexp.exe 2044 0.76 Sysinternals Process Explorer Sysinternals

Process: ruby.exe Pid: 4480

Type Name
Desktop \Default
Directory \BaseNamedObjects
Directory \Windows
Directory \KnownDlls
File \Device\Tcp
File \Device\Tcp
File \Device\WS2IFSL\NifsSct
File \Device\WS2IFSL\NifsPvd
File \Device\Afd\Endpoint
File \Device\KsecDD
File C:\Documents and Settings\bku
Key HKCU
Key HKLM\SYSTEM\ControlSet001\Services\Tcpip\Parameters\Interfaces
Key HKLM\SYSTEM\ControlSet001\Services\WinSock2\Parameters\NameSpace_Catalog5
Key HKLM\SYSTEM\ControlSet001\Services\WinSock2\Parameters\Protocol_Catalog9
Key HKLM
KeyedEvent \KernelObjects\CritSecOutOfMemoryEvent
Mutant \BaseNamedObjects\Neoteris:AppProxy:Statistics:Mutex
Section \BaseNamedObjects\Neoteris:AppProxy:Statistics
Thread ruby.exe(4480): 4056
Thread ruby.exe(4480): 4056
Thread ruby.exe(4480): 4420
Thread ruby.exe(4480): 4000
Thread ruby.exe(4480): 4896
Thread ruby.exe(4480): 4896
Thread ruby.exe(4480): 4896
WindowStation \Windows\WindowStations\WinSta0
WindowStation \Windows\WindowStations\WinSta0
 
B

Barry

Hi Glenn,

Thanks for the pointer. I was able to resolve the issue for my office
machine by removing the 3rd-party winsock component. I will have to
try the same thing on my home machine tonight and report back the
results.

It turned out to be a winsock installed by my company's VPN,
NetScreen/Neoteris, that was causing the problem for Ruby. The
solution I did was using "install/remove LSP" provided by NetScreen to
remove it. The NetScrere LSP remove program says you can use it if
Internet connection is not working, so I assume the VPN will work
without it. I will have to try it on my XP machine at home, and
hopefully it will resolve the Ruby issue and my VPN will continue
working.

There's a MS KB at http://support.microsoft.com/?kbid=811259 that shows
you how to verify your winsock with "msinfo32" if anyone is interested.

Thanks the help from everyone,

Barry
 
D

dolom

Hi everybody,

just to add that I had the same problem on my XP machine: following
your suggestions I noticed that further to the default ones my
protocols listed Google Desktop and PGP so I got rid of the latter and
my ruby sockets started working perfectly.

Thank you everybody for your helpful postings!

-- Marco --
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top