2013-02-12 64 views
7

每次我做一個上限:部署Capistrano將刪除我的資產,說他們是不需要的。事實上,他們是需要的,爲了讓他們回來,我必須做一個上限:資產:每次我做上限後進行預編譯:部署,否則我的網站沒有樣式或圖像。Capistrano刪除資產

是這樣的:normalize_asset_timestamps在部署期間不工作:finalize_update?

Capistrano的v2.14.1,Rails的v3.2.11

** Removing assets that haven't been deployed for 10080 minutes... 
* executing ... 
** [out :: server.com] comm: 
** [out :: server.com] file 2 is not in sorted order 
** [out :: server.com] Removing unneeded asset: application-66c9f07224da686e6b5a64752995df38.css 
** [out :: server.com] Removing unneeded asset: application-66c9f07224da686e6b5a64752995df38.css.gz 
** [out :: server.com] Removing unneeded asset: application-7b53d1e1411ed0a62ea32ace5ee4e7c2.js 
** [out :: server.com] Removing unneeded asset: application-7b53d1e1411ed0a62ea32ace5ee4e7c2.js.gz 
** [out :: server.com] Removing unneeded asset: application.css 
** [out :: server.com] Removing unneeded asset: application.css.gz 
** [out :: server.com] Removing unneeded asset: application.js 
** [out :: server.com] Removing unneeded asset: application.js.gz 

回答

6

這裏是解決方案:https://github.com/capistrano/capistrano/pull/422

要麼添加

after "deploy", "assets:precompile" 

你deploy.rb結束,並等待爲capistrano寶石更新

或將2行添加到您的capistrano寶石

,或者你可以更新Capistrano的從GitHub

gem 'capistrano', git: 'https://github.com/capistrano/capistrano.git' 

我不會reccomend

+1

謝謝燕姿直銷!現在更新capistrano寶石的作品。您鏈接的pullrequest已合併。 – 2013-08-06 15:22:56

+0

Thanx從我工作。在「部署」,「資產:預編譯」之後,我使用了'' – Hardik 2014-01-31 05:30:10