Does anyone have experience using Capistrano with the
capistrano_rsync_with_remote_cache gem in a WindowsXP/Cygwin
environment?  Is there a better or more-preferred method for
expeditiously updating remote servers?  I describe the problem that
I'm having below along with pertinent information.

Thank you for your time!
peter



The Problem
I successfully deploy my Rails application using the standard
Capistrano recipe (tarring an SVN directory and SFTP’ing it to the
remote server) and now I would like to use the rsync gem in place of
the standard recipe.  Steps 1 and 2 of the rsync deploy work
perfectly.  The problem is that the I get a “broken pipe – send (2)”
error when I try to communicate with the remote server in step three.
Although the copy SVN copy from my local pc to the remote server was
successful in step 2, the rysnc command appears to break the ssh
connection (see the console output below).


My Environment
Windows XP,  Cygwin, and native Cygwin ruby.  I know you said that the
gem has not been tested in a windows environment, but that’s where I
currently have to be.
Cygwin Library Versions
rsync  version 3.0.4  protocol version 30
OpenSSH_5.1p1, OpenSSL 0.9.8j 07 Jan 2009
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]
Subversion command-line client, version 1.5.5

$ gem list
*** LOCAL GEMS ***
capistrano (2.5.2)
capistrano-ext (1.2.1)
capistrano_rsync_with_remote_cache (2.2)


Relevant source from capistrano_rsync_with_remote_cache
   # The deployment method itself, in three major steps.
   def deploy!
     # Step 1: Update the local cache.
     system(command)
     File.open(File.join(local_cache, "REVISION"), "w") { |f| f.puts
(revision) }

     # Step 2: Update the remote cache.
     logger.trace "copying local cache to remote"
     find_servers(:except => { :no_release => true }).each do |server|
       system("rsync #{rsync_options} #{local_cache}/
              #{rsync_host(server)}:#{repository_cache}/")
     end

     # Step 3: Copy the remote cache into place.
     run("rsync -a --delete #{repository_cache}/ #{configuration
[:release_path]}/ && #{mark}")
   end


Cygwin Library Versions
rsync  version 3.0.4  protocol version 30
OpenSSH_5.1p1, OpenSSL 0.9.8j 07 Jan 2009
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]

$ gem list
*** LOCAL GEMS ***
capistrano (2.5.2)
capistrano-ext (1.2.1)
capistrano_rsync_with_remote_cache (2.2)


Console Output
Note: I changed the command in step three from an rsync to an ls for
testing purposes
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug2: channel 0: rcvd close
debug2: channel 0: close_read
debug2: channel 0: input open -> closed
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 1 clearing O_NONBLOCK
Transferred: sent 90733248, received 147512 bytes, in 185.8 seconds
Bytes per second: sent 488230.5, received 793.8
debug1: Exit status 0

sent 90455089 bytes  received 104160 bytes  472894.25 bytes/sec
total size is 122265846  speedup is 1.35
  * executing "ls -lh"
    servers: ["ec2-174-129-177-18.compute-1.amazonaws.com"]
Broken pipe - send(2)
/usr/lib/ruby/gems/1.8/gems/net-ssh-2.0.4/lib/net/ssh/buffered_io.rb:
98:in `send'
/usr/lib/ruby/gems/1.8/gems/net-ssh-2.0.4/lib/net/ssh/buffered_io.rb:
98:in `send_pending'
/usr/lib/ruby/gems/1.8/gems/net-ssh-2.0.4/lib/net/ssh/connection/
session.rb:217:in `postprocess'
/usr/lib/ruby/gems/1.8/gems/net-ssh-2.0.4/lib/net/ssh/connection/
session.rb:216:in `each'
/usr/lib/ruby/gems/1.8/gems/net-ssh-2.0.4/lib/net/ssh/connection/
session.rb:216:in `postprocess'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
processable.rb:31:in `process_iteration'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
processable.rb:43:in `ensure_each_session'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
processable.rb:41:in `each'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
processable.rb:41:in `ensure_each_session'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
processable.rb:29:in `process_iteration'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/command.rb:
163:in `process!'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/command.rb:
162:in `loop'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/command.rb:
162:in `process!'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/command.rb:
133:in `process'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/actions/invocation.rb:81:in `run_tree'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/connections.rb:170:in `execute_on_servers'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`each_slice'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/connections.rb:158:in `each'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/connections.rb:158:in `each_slice'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/connections.rb:158:in `execute_on_servers'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/actions/invocation.rb:79:in `run_tree'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/actions/invocation.rb:54:in `run'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/actions/invocation.rb:42:in `send'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/actions/invocation.rb:42:in `invoke_command'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/recipes/
deploy/strategy/base.rb:43:in `send'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/recipes/
deploy/strategy/base.rb:43:in `method_missing'
/usr/lib/ruby/gems/1.8/gems/capistrano_rsync_with_remote_cache-2.2/lib/
capistrano/recipes/deploy/strategy/rsync_with_remote_cache.rb:24:in
`deploy!'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/recipes/
deploy.rb:204:in `load'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/execution.rb:128:in `instance_eval'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/execution.rb:128:in
`invoke_task_directly_without_callbacks'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/callbacks.rb:27:in `invoke_task_directly'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/execution.rb:81:in `execute_task'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/namespaces.rb:186:in `send'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/namespaces.rb:186:in `method_missing'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/namespaces.rb:104:in `update_code'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/recipes/
deploy.rb:185:in `load'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/execution.rb:48:in `transaction'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/namespaces.rb:186:in `send'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/namespaces.rb:186:in `method_missing'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/recipes/
deploy.rb:184:in `load'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/execution.rb:128:in `instance_eval'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/execution.rb:128:in
`invoke_task_directly_without_callbacks'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/callbacks.rb:27:in `invoke_task_directly'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/execution.rb:81:in `execute_task'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/namespaces.rb:186:in `send'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/namespaces.rb:186:in `method_missing'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/namespaces.rb:104:in `update'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/recipes/
deploy.rb:153:in `load'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/execution.rb:128:in `instance_eval'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/execution.rb:128:in
`invoke_task_directly_without_callbacks'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/callbacks.rb:27:in `invoke_task_directly'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/execution.rb:81:in `execute_task'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/
configuration/execution.rb:93:in `find_and_execute_task'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/cli/
execute.rb:45:in `execute_requested_actions_without_help'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/cli/
execute.rb:44:in `each'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/cli/
execute.rb:44:in `execute_requested_actions_without_help'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/cli/
help.rb:19:in `execute_requested_actions'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/cli/
execute.rb:33:in `execute!'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/lib/capistrano/cli/
execute.rb:14:in `execute'
/usr/lib/ruby/gems/1.8/gems/capistrano-2.5.2/bin/cap:4
/usr/bin/cap:19:in `load'
/usr/bin/cap:19


--~--~---------~--~----~------------~-------~--~----~
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