I have the following, very simple task:

task :TestTransfer, :roles => [:app] do
        put(File.read(appFile), appFile)
end

When I run this on my Mac, it works fine. I was recently trying to
convert a customer over to using Capistrano for their deployments, and
they are running into a problem with the same task. It almost
immediately finishes the transfer regardless of the size of appFile,
and when you look on the server, the file is there, but truncated. I
then replicated the problem on a Windows virtual machine. My
replication recipe was essentially to install ruby 1.8.6 with the
Windows installer off rubyforge, then gem install capistrano, pulling
down the necessary dependencies of course.

I've confirmed that Net::SFTP is available and being used, so this
isn't a binary vs not issue. I also confirmed that Net::SFTP will
successfully transfer the file using its own API. The following script
works fine:

require 'net/sftp'

Net::SFTP.start('10.100.xxx.21', 'username', '*****, :registry_options
=> { :logs => {
        :levels => { "sftp.*" => :debug } } } ) do | sftp |

        sftp.put_file "app.zip", "app.zip"
end

Any ideas? This seems like a pretty basic thing to have go wrong. :/

James


--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to