after :finishing, :send_rollbar_notice do
on roles(:web) do
access_token = 'special_key_goes_here'
environment = fetch(:environment)
local_username = `whoami`.strip
revision = `git log -n 1 --pretty=format:"%H"`
curl_command = %{curl https://api.rollbar.com/api/1/deploy/ -F 'access_token=#{access_token}' -F 'environment=#{environment}' -F 'revision=#{revision}' -F 'local_username=#{local_username}'}
puts curl_command
output = run_locally "#{curl_command}"
puts output
end
end
在我运行cap deploy
命令后,有人可以帮我弄明白为什么我会收到跟踪错误吗?
ArgumentError: wrong number of arguments (1 for 0)
非常感谢任何帮助!
答案 0 :(得分:1)
知道了! :)
将on roles(:web) do
替换为run_locally do