0
我已經嘗試瞭解如何正確配置nginx爲rails 3.2提供靜態資產的其他問題,但無論我嘗試通過我的資產路徑加載瀏覽器在預編譯後與manifest.yml中指定的資產版本不匹配,因此未找到我的所有資產。軌道靜態資產路徑與預編譯清單不匹配
我的nginx的配置如下:
location ~ ^/assets/ {
# Per RFC2616 - 1 year maximum expiry
# http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
expires 1y;
add_header Cache-Control public;
gzip_static on;
# Some browsers still send conditional-GET requests if there's a
# Last-Modified header or an ETag header even if they haven't
# reached the expiry date sent in the Expires header.
add_header Last-Modified "";
add_header ETag "";
break;
}
我也檢查了nginx的根路徑是正確的。我通過Unix域套接字與獨角獸一起使用nginx。
第一次我設置這一切都加載罰款。然後我修改了資產並重新部署。那資產被打破了。然後我撞上了資產版本,現在所有資產都被破壞了。我已經嘗試清除我的本地緩存,以防造成問題,但沒有幫助。
我開始撕掉我的頭髮在這一點上,任何幫助將不勝感激。