Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/55.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 向capistrano添加一个额外的参数_Ruby On Rails_Deployment_Capistrano - Fatal编程技术网

Ruby on rails 向capistrano添加一个额外的参数

Ruby on rails 向capistrano添加一个额外的参数,ruby-on-rails,deployment,capistrano,Ruby On Rails,Deployment,Capistrano,我正在尝试向Capistrano添加一个额外参数,以便我们可以通过API查询中央服务器以获取目标: cap production deploy target 一切都很好,目标被预处理(在config/deploy/production.rb中),通过API找到正确的服务器(由目标确定),部署成功完成。但是,在部署结束时,我得到一个错误: (回溯仅限于导入的任务) 帽子流产了! 不知道如何构建任务“目标”(请参阅带有cap--tasks的可用任务列表) 有没有办法消除这个错误 仅供参考,我们在p

我正在尝试向Capistrano添加一个额外参数,以便我们可以通过API查询中央服务器以获取目标:

cap production deploy target
一切都很好,目标被预处理(在config/deploy/production.rb中),通过API找到正确的服务器(由目标确定),部署成功完成。但是,在部署结束时,我得到一个错误:

(回溯仅限于导入的任务) 帽子流产了! 不知道如何构建任务“目标”(请参阅带有
cap--tasks的可用任务列表)

有没有办法消除这个错误

仅供参考,我们在production.rb中使用第三个参数(target)的方法是使用ARGV,然后使用HTTParty查找中央服务器。我们的想法是,我们需要部署到20多个服务器,而不是每个新服务器都有一个部署文件,只需使用一个API即可获得目标

谢谢你的帮助, 凯文

(See full trace by running task with --trace)
The deploy has failed with an error: Don't know how to build task 'target' (See the list of available tasks with `cap --tasks`)