# Capistrano and after/before task...what's wrong?

**URL:** <https://www.ruby-forum.com/t/capistrano-and-after-before-task-whats-wrong/136737>\
**Category:** Deployment\
**Created:** [May 6, 2008, 12:23am UTC](https://www.ruby-forum.com/t/capistrano-and-after-before-task-whats-wrong/136737 "2008-05-06T00:23:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xdmx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/53a042/32.png) [@xdmx](https://www.ruby-forum.com/u/xdmx)\
**Post date:** [May 6, 2008, 12:23am UTC](https://www.ruby-forum.com/t/capistrano-and-after-before-task-whats-wrong/136737/1 "2008-05-06T00:23:30Z")

</div>

Hi, i’m setting up capistrano, but i’ve a “little” problem to run a  
custom task after the finalize\_update, or after the symlink task.  
Actually i’ve this in my deploy.rb

* * *

after :finalize\_update, :symlink\_shared\_stuff

## desc “Symlink the folders and files” task :symlink\_shared\_stuff, :roles =\> [:app, :web] do run “ln -nfs #{shared\_path}/upload #{current\_path}/upload” run “ln -nfs #{shared\_path}/system/database.yml #{current\_path}/config/database.yml” end

But it does never be run. What’s wrong ?  
The problem is that without the db config everything goes wrong when  
capistrano try to run the migrations (rake aborted: no db.yml file  
found)  
Thanks

---

<div class="post-metadata">

**Author:** ![xdmx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/53a042/32.png) [@xdmx](https://www.ruby-forum.com/u/xdmx)\
**Post date:** [May 6, 2008, 12:39am UTC](https://www.ruby-forum.com/t/capistrano-and-after-before-task-whats-wrong/136737/2 "2008-05-06T00:39:12Z")

</div>

Try after “deploy:finalize\_update”, :symlink\_shared\_stuff

On Mon, May 5, 2008 at 3:23 PM, Xdmx X.
