【发布时间】:2012-02-24 23:33:34
【问题描述】:
在 heroku cedar 上部署后,图像消失。
我有一个类似的 CSS:
:css
/* */
table.table thead .sorting { background: url('assets/datatables/sort_both.png') no-repeat center right; }
table.table thead .sorting_asc { background: url('assets/datatables/sort_asc.png') no-repeat center right; }
table.table thead .sorting_desc { background: url('assets/datatables/sort_desc.png') no-repeat center right; }
/* */
table.table thead .sorting_asc_disabled { background: url('assets/datatables/sort_asc_disabled.png') no-repeat center right; }
table.table thead .sorting_desc_disabled { background: url('assets/datatables/sort_desc_disabled.png') no-repeat center right; }
和相对 png 到 app/assets/images/datatables/Locally 有效,但不适用于 Heroku。
我也可以使用= asset_tag('datatables/icon.png') ...,但是如何在 CSS 中实现呢?
我也在config/environments/production.rb 中尝试过config.action_dispatch.x_sendfile_header = nil,但没有成功。
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-3.1 heroku asset-pipeline