capistrano run_locally错误的参数数量

时间:2015-06-11 14:55:27

标签: capistrano3

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)

非常感谢任何帮助!

1 个答案:

答案 0 :(得分:1)

知道了! :)

on roles(:web) do替换为run_locally do