我正在使用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
Run Code Online (Sandbox Code Playgroud)
我只定义了一个角色config/deploy/stagging.
role :app, %w{cap@aws-7}
Run Code Online (Sandbox Code Playgroud)
在config/deploy.rb我设置asset_roles像这样:
set :assets_roles, [:app] # Defaults to [:web]
Run Code Online (Sandbox Code Playgroud)
知道为什么不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}
Run Code Online (Sandbox Code Playgroud)
cap @ aws-7是您的deployuser@hostname.com
| 归档时间: |
|
| 查看次数: |
891 次 |
| 最近记录: |