Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

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 = 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


Report this thread to moderator Post Follow-up to this message
Old Post
mycallidus@yahoo.com
08-15-05 03:02 AM


Re: RubyGems or any HTTP on XP NOT working
Use Ctrl + Break  instead of Ctrl + C

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

On 8/14/05, mycallidus@yahoo.com <mycallidus@yahoo.com> wrote:
> 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,
>=20
> Updating Gem source index for: http://gems.rubyforge.org
>=20
> 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,
>=20
> require 'net/http'
> puts 'connecting...'
> Net::HTTP.start('www.google.com') do |http|
>    response =3D http.get('/index.html')
>    puts response.code
> end
>=20
> 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.
>=20
> Thanks,
> Barry
>=20
>=20
>



Report this thread to moderator Post Follow-up to this message
Old Post
Christopher Aldridge
08-15-05 03:02 AM


Re: RubyGems or any HTTP on XP NOT working
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: mycallidus@yahoo.com [mailto:mycallidus@yahoo.com]=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





Report this thread to moderator Post Follow-up to this message
Old Post
Kevin Olbrich
08-15-05 03:02 AM


Re: RubyGems or any HTTP on XP NOT working
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.


Report this thread to moderator Post Follow-up to this message
Old Post
mycallidus@yahoo.com
08-15-05 09:01 AM


Re: RubyGems or any HTTP on XP NOT working
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


Report this thread to moderator Post Follow-up to this message
Old Post
mycallidus@yahoo.com
08-15-05 09:01 AM


Re: RubyGems or any HTTP on XP NOT working
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
ezra@yakima-herald.com
509-577-7732



On Aug 14, 2005, at 9:06 PM, mycallidus@yahoo.com wrote:

> 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
>
>




Report this thread to moderator Post Follow-up to this message
Old Post
Ezra Zygmuntowicz
08-15-05 09:01 AM


Re: RubyGems or any HTTP on XP NOT working
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.


Report this thread to moderator Post Follow-up to this message
Old Post
barry
08-15-05 09:01 AM


Re: RubyGems or any HTTP on XP NOT working
Barry wrote:

> 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/Utiliti...ssExplorer.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




Report this thread to moderator Post Follow-up to this message
Old Post
daz
08-15-05 09:01 AM


Re: RubyGems or any HTTP on XP NOT working
Have you tried telnetting into your WEBrick server instead of using the 
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 
cursor will move to the top)

Also note you need to hit <enter> twice after the GET command (standard http
 
rules)

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

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


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


On 8/15/05, daz <dooby@d10.karoo.co.uk> wrote:
> 
> 
> Barry wrote:
>  
> 
> 
> Hi Barry,
> 
> Any chance you could grab this ?:
> 
> http://www.sysinternals.com/Utiliti...ssExplorer.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 <http://d10.karoo.co.uk> ]
> 
> I don't have XP, so that's probably all I can help with.
> 
> 
> daz
> 
> 
> 
> 
> 


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


Report this thread to moderator Post Follow-up to this message
Old Post
Brock Weaver
08-15-05 02:02 PM


Re: RubyGems or any HTTP on XP NOT working
I've recently updated to Windows XP SP2 and I also have ZoneAlarm Suite
installed on my machine...  There was a bunch of SpyWare that ZA went
ahead and quarantined for me, and suddenly DNS stopped working and my
Ruby scripts that accessed the web also stopped working!

I spent about 8 hours searching for a solution.  Finally, I came across
a Microsoft article that said to try this:

netsh winsock reset

This apparently completely re-installs the winsock service, as this is
a major target for spyware, viruses, etc.

Suddenly, everything started working again.  Then, the next day, the
same thing happened, and I needed to reset it *again*.  Now all my
Ruby scripts are working again.

Good luck!  I hope this saves you time, as I wasted a lot of it trying
to figure this one out.

-- Glenn

mycallidus@yahoo.com wrote:

> 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
>

Report this thread to moderator Post Follow-up to this message
Old Post
Glenn M. Lewis
08-15-05 10:04 PM


Sponsored Links




Last Thread Next Thread Next
Pages (2): [1] 2 »
Search this forum -> 
Post New Thread

Ruby archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 10:33 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.