ant*_*yer 3 ruby capistrano capistrano3
我有capistrano 3任务
namespace :db do
desc "serurely manages dbconn file after deploy"
task :dbconfig do
on roles(:web) do |host|
upload("config/deploy/dbconn.template.php", "#{shared_path}/dbconn.php")
end
end
end
Run Code Online (Sandbox Code Playgroud)
跑步时
cap staging db:dbconfig
我得到错误
cap aborted!
undefined method `upload' for #<SSHKit::Backend::Netssh:0x007ffe9a84b9f8>
Run Code Online (Sandbox Code Playgroud)
根据capistrano API,我可以使用此方法上传文件,我也在sshkit lib的源代码中找到它
宝石清单
*** LOCAL GEMS ***
bundler (1.3.5)
capistrano (3.0.1)
CFPropertyList (2.2.0)
i18n (0.6.5)
libxml-ruby (2.6.0)
net-scp (1.1.2)
net-ssh (2.7.0)
nokogiri (1.5.6)
rake (10.1.0)
sqlite3 (1.3.7)
sshkit (1.1.0)
term-ansicolor (1.2.2)
tins (0.13.1)
Run Code Online (Sandbox Code Playgroud)
看来该方法被称为upload!:https://github.com/capistrano/sshkit/blob/master/EXAMPLES.md#upload-a-file-from-disk
你在哪里看到它记录得很糟糕,也许你可以发送一个拉动请求来修复他们的文档?