我正在使用 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
我只定义了 1 个角色config/deploy/stagging
。
role :app, %w{cap@aws-7}
在config/deploy.rb
我这样设置asset_roles:
set :assets_roles, [:app] # Defaults to [:web]
知道为什么不assets:precompile
被执行吗?