net-ftp

Ruby 1.9 + Net::FTP => Encoding::UndefinedConversionError

橙三吉。 提交于 2020-01-15 11:25:08
问题 i upgraded from Ruby 1.8.7 to 1.9.2 (and Rails 3.2.2) and have the problem that Net::FTP#gettextfile is throwing an Encoding::UndefinedConversionError I'm trying to download a xml file which is encoded as utf-8. The dowload works fine if i use getbinaryfile, but i would like to understand why gettextfile is not working. # -*- encoding : utf-8 -*- # working ftp = Net::FTP.open(host,user,password) ftp.passive = true ftp.getbinaryfile("some.xml","tmp/some.xml") # not working ftp = Net::FTP.open

Can't call method “filename” without a package or object reference

不羁岁月 提交于 2020-01-06 07:21:06
问题 I want to download from a ftp server (host1) a bunch of directories with content. To do that I use library Net::FTP::Recursive. When I run the code the folders and files were downloaded. Nevertheless, I got this message: >Can't call method "filename" without a package or object reference at C:\10_LIB~1\PerlLib\lib\perl5/Net/FTP/Recursive.pm line 86. I wonder why this happens, what impact it has and how I can avoid this. Here is the code to download: # -- Libraries # coding and diagnostic use

A call to SSPI failed, see inner exception using FileZilla Server and System.Net.FtpClient

China☆狼群 提交于 2019-12-13 01:24:42
问题 I am setting up an FTP Server ( FileZilla ) and using the netftp codeplex project System.Net.FtpClient to connect to it over SSL / TLS using an X509Certificate2 . I've downloaded FileZilla Server from sourceforge. I've downloaded System.Net.FtpClient v14.06.17 from codeplex. I think I have isolated the problem, but maybe someone has some additional thoughts as to the underlying cause. A workaround is provided at the bottom of this post. An exception occurs calling client.GetListing() and

Why can't Net::FTP connect to server?

和自甴很熟 提交于 2019-12-04 17:36:31
问题 I am trying to create a script to list and download data from a FTP server with Ruby. I am new to Ruby so I looked for documentation how to use Net::FTP. I have trouble understanding why this doesn't work: require 'net/ftp' server = "ftp.server.com" user = "myuser" password = "mypassword" Net::FTP.open(server, user, password) do |ftp| files = ftp.chdir('mydirectory/') files = ftp.list puts "list out of directory:" puts files end That doesn't work, returning this error: /home/adhown/.rvm

Why can't Net::FTP connect to server?

早过忘川 提交于 2019-12-03 11:15:16
I am trying to create a script to list and download data from a FTP server with Ruby. I am new to Ruby so I looked for documentation how to use Net::FTP. I have trouble understanding why this doesn't work: require 'net/ftp' server = "ftp.server.com" user = "myuser" password = "mypassword" Net::FTP.open(server, user, password) do |ftp| files = ftp.chdir('mydirectory/') files = ftp.list puts "list out of directory:" puts files end That doesn't work, returning this error: /home/adhown/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/ftp.rb:298:in `getresp': 425 >Failed to establish connection. (Net