You need

ftp =Net::FTP.new('www.aaa.com', 'xxx', 'xxx')

or

include Net
ftp = FTP.new('www.aaa.com', 'xxx', 'xxx')

The FTP class is part of the module Net.

"Todd Smith" <todd / designsouth.net> wrote in message news:tmgO6.53686$I5.11583986 / news1.rdc1.tn.home.com...
> why doesn't his code work ?
>
> -----------------
> require 'net/ftp'
> ftp = FTP.new('www.aaa.com', 'xxx', 'xxx')
> ------------------
>
> it gives this error:
>
> C:\ruby\bin>ruby "C:\Documents and Settings\Administrator\Desktop\radio.rbw"
> C:\Documents and Settings\Administrator\Desktop\radio.rbw:3: uninitialized
> constant FTP (NameError)
>
> The class in the net/ftp.rb file is called "FTP"
>
>