gpt4 book ai didi

capistrano3 - bundle exec rake assets :precompile 没有匹配的主机

转载 作者:行者123 更新时间:2023-12-04 02:35:50 24 4
gpt4 key购买 nike

我正在使用 capistrano 3.0.1 和 capistrano-rails 1.1.0 进行部署。到目前为止,部署运行良好,只有 assets:precompile 没有被执行。该阶段每次都会跳过此消息:

WARN [SKIPPING] No Matching Host for /usr/bin/env if test ! -d /var/www/versioneye/releases/20140111161403; then echo "Directory does not exist '/var/www/versioneye/releases/20140111161403'" 1>&2; false; fi
WARN [SKIPPING] No Matching Host for bundle exec rake assets:precompile
WARN [SKIPPING] No Matching Host for /usr/bin/env if test ! -d /var/www/versioneye/releases/20140111161403; then echo "Directory does not exist '/var/www/versioneye/releases/20140111161403'" 1>&2; false; fi
WARN [SKIPPING] No Matching Host for /usr/bin/env cp /var/www/versioneye/releases/20140111161403/public/assets/manifest* /var/www/versioneye/releases/20140111161403/assets_manifest_backup
WARN [SKIPPING] No Matching Host for /usr/bin/env if test ! -d /var/www/versioneye/releases/20140111161403; then echo "Directory does not exist '/var/www/versioneye/releases/20140111161403'" 1>&2; false; fi
WARN [SKIPPING] No Matching Host for /usr/bin/env find public/images public/javascripts public/stylesheets -exec touch -t 201401111614.03 {} ';'; true

我在 config/deploy/stagging 中只定义了 1 个角色。

role :app, %w{cap@aws-7}

config/deploy.rb 中,我将asset_roles 设置为:

set :assets_roles, [:app]   # Defaults to [:web]

知道为什么 assets:precompile 没有被执行吗?

最佳答案

没有匹配的主机可能意味着您没有为该角色设置主机。我也是走捷径,只填了role:app,出现了这个问题,填了role:web,还是有问题,填了 >role :db,我可以成功部署,包括每次写入crontab。

role :app %w{cap@aws-7}
role :web %w{cap@aws-7}
role :db %w{cap@aws-7}

其中 cap@aws-7 是您的 deployuser@hostname.com

关于capistrano3 - bundle exec rake assets :precompile 没有匹配的主机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21065019/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com