2
我在使用時/ capistrano更新我的cron_tab與capistrano部署時,直到最近我的部署工作良好,直到最近我的部署在更新cron_tab時開始失敗。每當/ capistrano`method_missing_with_variables':未定義方法`role_names_for_host'
.rvm/gems/[email protected]/gems/capistrano-2.8.0/lib/capistrano/configuration/variables.rb:122:in `method_missing_with_variables': undefined method `role_names_for_host' for #<Capistrano::Configuration:0x000000018e6a10> (NoMethodError)
我設置* role_names_for_host *
set_default(:whenever_roles, [:workers])
,我的任務是這樣的
namespace :whenever do
desc "Stop whenever"
task :stop , roles: [:workers] do
clear_crontab
end
desc "Start whenever"
task :start , roles: [:workers] do
update_crontab
end
desc "Restart whenever"
task :restart , roles: [:workers] do
update_crontab
end
after 'deploy:symlink', 'whenever:update_crontab'
%w[start stop restart].each do |command|
after "deploy:#{command}", "whenever:#{command}"
end
end
什麼我可能做錯了什麼想法?
寶石版本
- Capistrano的(2.8.0)
- 每當(0.8.2)
這個問題似乎與隨時0.8.2,當我切換回到0.8.0它再次正常工作。 – Martinffx