Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Net::FTP problem with localhost

Reply
Thread Tools

Net::FTP problem with localhost

 
 
Damian Terentiev
Guest
Posts: n/a
 
      04-23-2008
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/.

 
Reply With Quote
 
 
 
 
Gordon Thiesfeld
Guest
Posts: n/a
 
      04-23-2008
On Wed, Apr 23, 2008 at 7:33 AM, Damian Terentiev <(E-Mail Removed)> 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

 
Reply With Quote
 
 
 
 
Damian Terentiev
Guest
Posts: n/a
 
      04-23-2008
> 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/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Limit Ring server to localhost only. RingFinger.new('localhost')apparently doesn't work koicat Ruby 0 07-02-2010 08:01 PM
change from "//localhost:numbers/" to just "//localhost/"? =?Utf-8?B?S2VuTGVl?= ASP .Net 5 02-12-2006 05:14 AM
Localhost isn't localhost EdwardH Java 20 10-01-2005 12:08 AM
Can I Reset the Root from localhost/myproject/ to localhost/ Alex ASP .Net 4 02-08-2005 01:45 PM
HttpModule -- how to intercept urls like http://localhost/abc/def or http://localhost/abc/def/ where abc, def are non virtual dir Jiong Feng ASP .Net 0 11-19-2003 05:29 AM



Advertisments