# Capistrano: after\_deploy doesn't run if I deploy\_with\_migrat

**URL:** <https://www.ruby-forum.com/t/capistrano-after-deploy-doesnt-run-if-i-deploy-with-migrat/89059>\
**Category:** Rails\
**Created:** [March 16, 2007, 9:14pm UTC](https://www.ruby-forum.com/t/capistrano-after-deploy-doesnt-run-if-i-deploy-with-migrat/89059 "2007-03-16T21:14:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pergesu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Post date:** [March 16, 2007, 9:14pm UTC](https://www.ruby-forum.com/t/capistrano-after-deploy-doesnt-run-if-i-deploy-with-migrat/89059/1 "2007-03-16T21:14:24Z")

</div>

I’ve got an after\_deploy task in my cap script. If I cap deploy, the  
task executes. If I do cap deploy\_with\_migrations, it doesn’t. Do I  
have to define the deploy\_with\_migrations task to include this  
after\_deploy task?

Pat

---

<div class="post-metadata">

**Author:** ![pergesu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Post date:** [March 16, 2007, 9:56pm UTC](https://www.ruby-forum.com/t/capistrano-after-deploy-doesnt-run-if-i-deploy-with-migrat/89059/2 "2007-03-16T21:56:29Z")

</div>

You might try the capistrano mailing list. Due to the heavy traffic  
here, the people who know a lot about capistrano might not see your post  
here.

[http://groups.google.com/group/capistrano](http://groups.google.com/group/capistrano)

---

<div class="post-metadata">

**Author:** ![pergesu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Post date:** [March 17, 2007, 1:15am UTC](https://www.ruby-forum.com/t/capistrano-after-deploy-doesnt-run-if-i-deploy-with-migrat/89059/3 "2007-03-17T01:15:07Z")

</div>

Pat-

On Mar 16, 2007, at 1:12 PM, Pat M. wrote:

> I’ve got an after\_deploy task in my cap script. If I cap deploy, the  
> task executes. If I do cap deploy\_with\_migrations, it doesn’t. Do I  
> have to define the deploy\_with\_migrations task to include this  
> after\_deploy task?
> 
> Pat

Does the task you have really need to run after deploy? You could  
use after\_restart and it will work in basically the exact same way  
but it will apply to either deploy or deploy\_with\_migrations

Cheers-  
– Ezra Z.  
– Lead Rails Evangelist  
– removed\_email\_address@domain.invalid  
– Engine Y., Serious Rails Hosting  
– (866) 518-YARD (9273)

---

<div class="post-metadata">

**Author:** ![pergesu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Post date:** [March 17, 2007, 3:36am UTC](https://www.ruby-forum.com/t/capistrano-after-deploy-doesnt-run-if-i-deploy-with-migrat/89059/4 "2007-03-17T03:36:19Z")

</div>

On 3/16/07, Ezra Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Pat
> 
> ```
> Does the task you have really need to run after deploy? You could
> 
> ```
> 
> use after\_restart and it will work in basically the exact same way  
> but it will apply to either deploy or deploy\_with\_migrations

Yeah that’s what I decided to do. Partly I was just curious why it  
acted differently with deploy\_with\_migrations.

Pat
