Запуск task
Покажите пример вызова заданной task (deploy:run_migrate) изнутри хука (after 'deploy:update_code' ...). Так, как написано сейчас падает с ошибкой, а пример нужного, найти не могу, везде однострочники типа after 'deploy:update_code', 'deploy:run_migrate'.
command finished in 1578ms
/home/reaper/.rvm/gems/ruby-1.9.3-p194@rails3/gems/capistrano-2.13.4/lib/capistrano/configuration/namespaces.rb:83:in `block in namespace': wrong number of arguments (1 for 0) (ArgumentError)
from ./config/deploy.rb:50:in `block in load'
from /home/reaper/.rvm/gems/ruby-1.9.3-p194@rails3/gems/capistrano-2.13.4/lib/capistrano/callback.rb:25:in `call'
from /home/reaper/.rvm/gems/ruby-1.9.3-p194@rails3/gems/capistrano-2.13.4/lib/capistrano/callback.rb:25:in `call'
from /home/reaper/.rvm/gems/ruby-1.9.3-p194@rails3/gems/capistrano-2.13.4/lib/capistrano/configuration/callbacks.rb:141:in `block in trigger'
...
namespace :deploy do
task :run_migrate do
run "cd #{deploy_to}/current && rake db:migrate"
end
end
after 'deploy:update_code', :roles => :app do
run "rm -rf #{current_release}/db/data"
run "ln -s #{deploy_to}/shared/data #{current_release}/db"
deploy:run_migrate
end