Capistrano SFTP Deployment

Hair loss

Deploying without Subversion access

If you don't have Subversion access from your live Rails server, the standard Capistrano setup after a 'capify' can cause problems if using:

set :deploy_via, :copy
set :copy_strategy, :export

In that, when Capistrano says it's uploading stuff, it really only makes a 0-length file. It's something to do with Net::SFTP being thread-problematic.

However, as I found at the bottom of this Capistrano mailing archive, you just need to add this line to your config/deploy.rb:

set :synchronous_connect, true

And everything work hunky-dory.

Comments

Duck on Tuesday 2nd October 4:40 PM

“Thanks, you saved me time digging thru doc and stuff!!!

Your right, everything was hunky-dory... ”

(Duck thought this page was excellent)
Leave a comment
Care to rate this page?

Back to Code

Top