我無法解決生產環境的問題。我在heroku上的application.css是空的,而在開發過程中它很好。Rails和Heroku的資產管道
在我的application.rb中添加此: config.assets.enabled = true
config.assets.compress = false
,但它仍然無法正常工作。
預編譯不起作用。在做完之後,heroku會發出一條消息,表明它已經找到了一個清單文件,但仍然無效。爲了回滾它,我使用了rake assets:clean。該消息仍然出現。
我該怎麼辦?我只有一個沒有JS的CSS文件。
鏈接到應用程序:我Application.css的 http://floating-hamlet-8270.herokuapp.com/
部分:
/*
* 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;
}
在這兩種情況下,推到Heroku的雲的權利,但文件是不是GETed通過瀏覽器。不幸的是,我在文檔中嘗試了一切,但樣式仍然沒有出現......是否有一種方法可以禁用Heroku中的鏈輪? –