Deploy: config/database.yml symlinked to incorrect place

I’m trying to deploy a really basic rails app with the deploy resource. It creates a release directory and checks out the code there no problem. It then creates the following symlink:

database.yml -> /var/www/example_rails/shared/config/database.yml

which looks good except that the only thing in that directory is a directory called cached_copy which contains the checked out project. Can anyone tell me what is wrong? Thanks

Responded on IRC.