Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
socket not connected
Mateusz Winiarski
6/21/2008 12:14:00 PM
Hi,
I want to run simple code:
require 'net/http'
Net::HTTP.start('www.rubyinside.com') do |http|
req = Net::HTTP::Get.new('/test.txt')
puts http.request(req).body
end
but I've got following error:
A request to send or receive data was disallawed because the socket is
not connected and (when sending on a datagram socket using a sendto
call) no address was supplied. (Errno::ENOTCONN).
Is it because im behind proxy ?
How to make code run smoothly ?
Thx
--
Posted via
http://www.ruby-...
.
1 Answer
Zhukov Pavel
6/21/2008 12:20:00 PM
0
On Sat, Jun 21, 2008 at 4:14 PM, Mateusz Winiarski
<mawiniarski@gmail.com> wrote:
> Hi,
>
> I want to run simple code:
>
> require 'net/http'
> Net::HTTP.start('www.rubyinside.com') do |http|
> req = Net::HTTP::Get.new('/test.txt')
> puts http.request(req).body
> end
>
> but I've got following error:
>
> A request to send or receive data was disallawed because the socket is
> not connected and (when sending on a datagram socket using a sendto
> call) no address was supplied. (Errno::ENOTCONN).
>
> Is it because im behind proxy ?
Yes
> How to make code run smoothly ?
Look at Net::HTTP::Proxy
> Thx
> --
> Posted via
http://www.ruby-...
.
>
>
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
socket not connected
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password