[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

FTP error

paulo.junqueira

8/15/2008 12:45:00 PM

Hi,

I'm new to ruby and writing a small ftp program to list some files.
I'm testing using my own localhost ftp, but ruby is giving me the
following error:

getaddrinfo: no address associated with hostname. (SocketError)

I don't have a proxy and my windows 2003 firewall is off, since I have
a router configured for this task.

Could someone help, please?

Thanks in advance!
4 Answers

Jeff

8/15/2008 1:47:00 PM

0

On Aug 15, 7:47=A0am, paulo.junque...@gmail.com wrote:
> Hi,
>
> I'm new to ruby and writing a small ftp program to list some files.
> I'm testing using my own localhost ftp, but ruby is giving me the
> following error:
>
> getaddrinfo: no address associated with hostname. (SocketError)
>
> I don't have a proxy and my windows 2003 firewall is off, since I have
> a router configured for this task.
>
> Could someone help, please?
>
> Thanks in advance!

Can you get to that address with any other FTP client (IE7, FileZilla,
etc.?)

Jeff

paulo.junqueira

8/15/2008 6:13:00 PM

0

On 15 ago, 10:46, Jeff <cohen.j...@gmail.com> wrote:
> On Aug 15, 7:47 am, paulo.junque...@gmail.com wrote:
>
> > Hi,
>
> > I'm new to ruby and writing a small ftp program to list some files.
> > I'm testing using my own localhost ftp, but ruby is giving me the
> > following error:
>
> > getaddrinfo: no address associated with hostname. (SocketError)
>
> > I don't have a proxy and my windows 2003 firewall is off, since I have
> > a router configured for this task.
>
> > Could someone help, please?
>
> > Thanks in advance!
>
> Can you get to that address with any other FTP client (IE7, FileZilla,
> etc.?)
>
> Jeff

Hi Jeff!

Yes, I can get there using Firefox, Filezilla, etc.

paulo.junqueira

8/19/2008 7:11:00 PM

0

On 15 ago, 15:13, paulo.junque...@gmail.com wrote:
> On 15 ago, 10:46, Jeff <cohen.j...@gmail.com> wrote:
>
>
>
> > On Aug 15, 7:47 am, paulo.junque...@gmail.com wrote:
>
> > > Hi,
>
> > > I'm new to ruby and writing a smallftpprogram to list some files.
> > > I'm testing using my own localhostftp, but ruby is giving me the
> > > followingerror:
>
> > > getaddrinfo: no address associated with hostname. (SocketError)
>
> > > I don't have a proxy and my windows 2003 firewall is off, since I have
> > > a router configured for this task.
>
> > > Could someone help, please?
>
> > > Thanks in advance!
>
> > Can you get to that address with any otherFTPclient (IE7, FileZilla,
> > etc.?)
>
> > Jeff
>
> Hi Jeff!
>
> Yes, I can get there using Firefox, Filezilla, etc.

That's my simple code:

require 'net/ftp'

ftp = Net::FTP.new
ftp.passive = true
ftp.connect('127.0.0.1:9090')
ftp.login
files = ftp.list('*')
print files + '/n'
ftp.close

I tried other ftp sites too, but got the same error:

in `initialize': getaddrinfo: no address associated with hostname.
(SocketError)

I appreciate any help.

Thanks in advance.

paulo.junqueira

8/19/2008 10:30:00 PM

0

On 19 ago, 16:11, Paulo Junqueira <paulo.junque...@gmail.com> wrote:
> On 15 ago, 15:13, paulo.junque...@gmail.com wrote:
>
>
>
> > On 15 ago, 10:46, Jeff <cohen.j...@gmail.com> wrote:
>
> > > On Aug 15, 7:47 am, paulo.junque...@gmail.com wrote:
>
> > > > Hi,
>
> > > > I'm new to ruby and writing a smallftpprogram to list some files.
> > > > I'm testing using my own localhostftp, but ruby is giving me the
> > > > followingerror:
>
> > > > getaddrinfo: no address associated with hostname. (SocketError)
>
> > > > I don't have a proxy and my windows 2003 firewall is off, since I have
> > > > a router configured for this task.
>
> > > > Could someone help, please?
>
> > > > Thanks in advance!
>
> > > Can you get to that address with any otherFTPclient (IE7, FileZilla,
> > > etc.?)
>
> > > Jeff
>
> > Hi Jeff!
>
> > Yes, I can get there using Firefox, Filezilla, etc.
>
> That's my simple code:
>
> require 'net/ftp'
>
> ftp= Net::FTP.newftp.passive = trueftp.connect('127.0.0.1:9090')ftp.login
> files =ftp.list('*')
> print files + '/n'ftp.close
>
> I tried otherftpsites too, but got the sameerror:
>
> in `initialize': getaddrinfo: no address associated with hostname.
> (SocketError)
>
> I appreciate any help.
>
> Thanks in advance.

It's working now. I tried before using user and pass, but in the same
order. Too newbie hum? Hope this could help someone else. Working
code:

require 'net/ftp'

ftp = Net::FTP.new
ftp.connect('127.0.0.1', 9090)
ftp.login('Administrator', '*****')
files = ftp.list('*')
puts files
ftp.close