16

I've recently updated my gem to version 3.1.0, and since then cap production deploy passes fine, but the target deploy:restart is not called.

My server is deployed on Ubuntu 12.10 on Amazon EC2.

Why could that be?

0

3 Answers 3

43

Capistrano 3 no longer runs that task by default as many app servers don't require it. Add this to your config/deploy.rb:

after 'deploy:publishing', 'deploy:restart'

From the release notes:

Breaking changes:

  • deploy:restart task is no longer run by default. From this version, developers who restart the app on each deploy need to declare it in their deploy flow (eg after 'deploy:publishing', 'deploy:restart').

    Please, check 4e6523e for more information. (@kirs)

0
1

If you are using namespaces, you can also do the following:

namespace :deploy do
  desc "My description"
  task :my_task do
    #do something
  end
  after :publishing, :my_task
end
0

In my case, in file 'production.rb' I had this roles: %w{web, app, db} which prevent block on roles(:app), in: :sequence, wait: 5 do in file "deploy.rb" from correct execution.You see, it needs to be roles: %w{web app db}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.