I have a Rails app running on a machine with Capistrano 2.5.18 and Rake 0.9.2.2.
Deployment works just fine.

I have setup the same app on another machine that runs Capistrano 2.12.0 and Rake 0.9.2.2 and it runs to a point - copies files etc. - but does not run my after hooks.

I read about the deploy:symlink task being changed to deploy:create\_symlink so I updated that.

This is the recipe stripped down...

```
set :ssh_options, { :forward_agent => true }
set :use_sudo, true 
set :deploy_via, :copy
set :copy_strategy, :export
set :copy_compression, :gzip
on :load, 'max:deploy:ask_env'

after 'deploy:create_symlink', 'max:deploy:finalize_update' # DOESN'T WORK!!

namespace :deploy do
  task :restart do
    run "#{sudo :as => admin_runner} touch #{current_path}/tmp/restart.txt"
  end
end

namespace :max do
  [...]
  namespace :deploy do
    # NEVER CALLED!!!
    desc "Finalizes update by setting permissions"
    task :finalize_update do
      run "chgrp -R #{admin_group} #{current_release}; exit 0"
    end
  end
  [...]
end

```

The last bit of output when running the script looks like...

```
  * executing `deploy:create_symlink'
  * executing "rm -f /home/s-exer1/webapps/max-shared-desktop/application_home/current && ln -s /home/s-exer1/webapps/max-shared-desktop/application_home/releases/20121031124115 /home/s-exer1/webapps/max-shared-desktop/application_home/current"
    servers: ["vaomb81"]
    [vaomb81] executing command
    command finished in 97ms
 ** transaction: commit
  * executing `deploy:restart'
  * executing "sudo -p 'sudo password: ' -u s-exer1 touch /home/s-exer1/webapps/max-shared-desktop/application_home/current/tmp/restart.txt"

```

The deploy:create\_symlink task runs and then it jumps to deploy:restart - skipping my after hook.

Any suggestions as to what might be causing this?

Thanks