2014-01-11 54 views
3

我使用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{[email protected]} 

而在config/deploy.rb我這樣設置asset_roles:

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

任何想法,爲什麼assets:precompile不到風度得到執行?

回答

1

不知何故assets_roles在我的情況下沒有任何影響。在我明確設置了config/deploy/stagging的網絡角色後,它就可以工作了。

role :web, %w{[email protected]} 
7

否匹配主機可能意味着您沒有爲該角色設置主機。我也採取了快捷方式,只填寫了role :app,然後出現了這個問題,並填寫了role :web,仍然有問題,並填寫了role :db,我可以成功部署,包括每當寫入crontab時。

role :app %w{[email protected]} 
role :web %w{[email protected]} 
role :db %w{[email protected]} 

凡帽@ AWS-7是你[email protected]

0

更新到Capistrano的護欄1.1.1

Capistrano的護欄1.1.0卻沒有'set:assets_roles ..'功能。

相關問題