I’m working on a simple scraping tool and the open() method has suddenly
stopped working! This 2 line program fails with a ECONNREFUSED exception
in open-uri:
from /usr/lib/ruby/1.8/open-uri.rb:134:in `open_uri'
from /usr/lib/ruby/1.8/open-uri.rb:424:in `open'
from /usr/lib/ruby/1.8/open-uri.rb:85:in `open'
from /Users/cyrus/Desktop/test.rb:3
I’m working on a simple scraping tool and the open() method has
suddenly
stopped working! This 2 line program fails with a ECONNREFUSED
exception
in open-uri:
Thanks for responding to this post. Here’s a recap of what’s going on:
I had no problems with the open() call for almost two days, but then
suddenly it stopped working. I have no problems with my internet
connection and the site I want to reach is definitely up. I’ve tried
this test from three difeerent locations with the same result.
Regarding Eric H.'s question, I’m not sure if I am behind a proxy (or
firewall for that matter). How can I find out?
Also, are there other ways of testing something like this in Ruby? Will
it help to upgrade to 1.8.5?
Have you tried rebooting your computer? Has a similar connection attempt
worked before today? Have you reconfigured your network recently? Have
you
tried pinging the site by IP and by name in a console?
to talk straight to the right port on the destination system is a better
choice than a browser since you know telnet won’t play games with things
like proxies and caches.
Regarding Eric H.'s question, I’m not sure if I am behind a proxy
(or firewall for that matter). How can I find out?
This is the bit that makes me suspicious; if you don’t know how to find
out
whether or not you’re behind a proxy of some sort, what did you do to
figure
out that the site you want to reach is “definitely up?”
If you’re just testing that you can connect to the remote site by
hitting
refresh on a browser, there are possible things between you and the
target
that could give you misleading symptoms.
Thanks for responding to this post. Here’s a recap of what’s going on:
I had no problems with the open() call for almost two days, but then
suddenly it stopped working. I have no problems with my internet
connection and the site I want to reach is definitely up. I’ve tried
this test from three difeerent locations with the same result.
So what changed when it stopped working?
Regarding Eric H.'s question, I’m not sure if I am behind a
proxy (or
firewall for that matter). How can I find out?
If you’re at work, you might be behind a proxy. Check your browser
settings for proxy configuration. If you’re at home, unlikely.
Also, are there other ways of testing something like this in Ruby?
Will
it help to upgrade to 1.8.5?
Thanks James. Actually, I’ve opened another topic called “Komodo issue”
and I’d appreciate it if you could take a look there. Essentially, I can
make the http connection from within a Terminal session (on my Mac OS X
10.4.6) using the Ruby interpreter. All the tests described above were
being run from within Komodo…
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.