How do I use the Capistrano upload function in a recipe? It seems simple
enough, but I can’t get it to work.
Here’s my recipe
desc "Copy the development database to the staging database" task :copy_db_to_staging, :hosts =>'my_staging_server' do system "mysqldump -u root -pmypassword my_development_db > ~/db_backups/tg-3-dev-backup.sql" system "gzip ~/db_backups/tg-3-dev-backup.sql " upload "~/db_backups/tg-3-dev-backup.sql.gz", "/my_dir_for_db_backups" end
It all works until it gets to upload where it fails with
=': undefined method=’ for nil:NilClass (NoMethodError)
So what’s the technique for uploading a file using Capistrano?