【发布时间】:2014-03-18 13:17:37
【问题描述】:
我无法解决生产环境的问题。我在 heroku 上的 application.css 是空的,而在开发中它很好。
在我的 application.rb 我添加了这个:
config.assets.enabled = true
config.assets.compress = false
但还是不行。
预编译也不起作用。在我完成之后,heroku 会发出一条消息,指出它找到了一个清单文件,但仍然 - 无法正常工作。为了回滚它,我使用了 rake assets:clean。消息仍然出现。
我能做什么?我只有一个没有 JS 的 CSS 文件。
应用链接: http://floating-hamlet-8270.herokuapp.com/
我的 Application.css 的一部分:
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require_tree .
*/
html, body, h1, h2, h3, h4, h5, h6, p, ul, li {
margin: 0;
padding: 0;
}
body {
font-family: "Noto Sans", sans-serif;
}
【问题讨论】:
标签: ruby-on-rails heroku asset-pipeline