【发布时间】:2011-10-30 18:49:19
【问题描述】:
我在 Apache+Passenger 的子目录 (/customers) 中部署了一个 rails 3.1 应用程序,使用此方法 http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rails_to_sub_uri
在 /app/assets/stylesheets/app.css.erb 这段代码
background: url(<%=image_path("top.jpg")%>)
生成
background: url(/assets/top.jpg)
而不是 /customers/assets/top.jpg
在我看来,
image_path("top.jpg")
会生成
/customers/assets/top.jpg
如我所料。
有什么想法吗?
【问题讨论】:
标签: ruby-on-rails-3.1 asset-pipeline