Net::FTP problem with localhost

Discussion in 'Ruby' started by Damian Terentiev, Apr 23, 2008.

  1. Good day all!

    I've started an FTP server on localhost:8021.
    Other clients (I've tried wget) connect successfully.
    Net:FTP.open('localhost:8021') raises an exception:

    SocketError: getaddrinfo: nodename nor servname provided, or not known

    It is ruby 1.8.6 on Mac OS X 10.5 Leopard.
    Could anyone please help me identify the source of the problem and give
    me any advice?
    --
    Posted via http://www.ruby-forum.com/.
     
    Damian Terentiev, Apr 23, 2008
    #1
    1. Advertising

  2. On Wed, Apr 23, 2008 at 7:33 AM, Damian Terentiev <> wrote:
    > Good day all!
    >
    > I've started an FTP server on localhost:8021.
    > Other clients (I've tried wget) connect successfully.
    > Net:FTP.open('localhost:8021') raises an exception:


    Look at the connect method.

    Untested:

    ftp = Net::FTP.new
    ftp.connect(host, port)
    ftp.login(user, password)

    hope that helps,

    Gordon
     
    Gordon Thiesfeld, Apr 23, 2008
    #2
    1. Advertising

  3. > Look at the connect method.
    >
    > hope that helps,


    Thank you very much, Gordon.
    That indeed saved the situation.

    Damian
    --
    Posted via http://www.ruby-forum.com/.
     
    Damian Terentiev, Apr 23, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jiong Feng
    Replies:
    0
    Views:
    856
    Jiong Feng
    Nov 19, 2003
  2. Alex
    Replies:
    4
    Views:
    581
    Hasani Blackwell
    Feb 8, 2005
  3. =?Utf-8?B?S2VuTGVl?=
    Replies:
    5
    Views:
    2,725
  4. EdwardH

    Localhost isn't localhost

    EdwardH, Sep 29, 2005, in forum: Java
    Replies:
    20
    Views:
    6,416
    Roedy Green
    Oct 1, 2005
  5. D. Buck
    Replies:
    2
    Views:
    500
    D. Buck
    Jun 29, 2004
Loading...

Share This Page