簡體   English   中英

Capistrano部署時出現以下錯誤

[英]Getting the following error while capistrano deploying

部署時出現以下錯誤

DEBUG[c3b88189] Running /usr/bin/env [ -f /home/ubuntu/apps/stag/shared/config/database.yml ] on **.***.***.**
DEBUG[c3b88189] Command: [ -f /home/ubuntu/apps/
stag/shared/config/database.yml ]
DEBUG[c3b88189] Finished in 0.579 seconds with exit status 1 (failed).
ERROR linked file /home/ubuntu/apps/stag/shared/config/database.yml does not exist on **.***.***.**
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host **.***.***.**: exit

SystemExit: exit

Tasks: TOP => deploy:check:linked_files
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing on host 

如何糾正呢?

remote_file任務允許將遠程文件的存在設置為先決條件。 如果需要,這些任務又可以依賴於本地文件。

namespace :deploy do
  namespace :check do
    task :linked_files => 'config/database.yml'
  end
end

remote_file 'config/database.yml' => '/local/database.yml'

http://capistranorb.com/documentation/advanced-features/remote-file/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM