【发布时间】:2014-02-28 00:34:54
【问题描述】:
我有一个基本的 Rails 网站的背景图片,但当我把它推到 heroku 时,它给了我以下错误
Failed to load resource: the server responded with a status of 404 (Not Found) http://young-oasis-2855.herokuapp.com/assets/joy.jpg
这是我的 css 文件中的代码
body {
background: url(/assets/joy.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
我上传了其他几张图片并且工作正常,有人知道为什么这在 heroku 上不起作用,但仍在本地工作吗?
【问题讨论】:
标签: css ruby-on-rails heroku