简体   繁体   English

Rails 4 - Heroku,预编译资产失败

[英]Rails 4 - Heroku, precompile assets failed

I'm having a problem with assets loading in Heroku and haven't been able to resolve this issue on my own. 我在Heroku中遇到资产加载问题,但我自己无法解决这个问题。 Right now, I am unable to get assets to load on my app in Heroku. 现在,我无法在Heroku中的应用程序上加载资源。

I was told that I needed to precompile my assets locally. 有人告诉我,我需要在本地预编译我的资产。 The only way I could get this to work was by changing = require_self and 我能让这个工作的唯一方法是改变= require_self = require_tree . in application.css manifest to @import . 在application.css中显示为@import From there I was able to run rake assets:precompile , but no styles loaded on Heroku or locally. 从那里我可以运行rake assets:precompile ,但没有在Heroku或本地加载样式。 I switched things back and now styles show up locally, but I can no longer push to heroku. 我把东西换回来,现在样式出现在本地,但我再也不能推送到heroku了。 I get this error: 我收到此错误:

rake aborted!
Sass::SyntaxError: Invalid CSS after "...AwesomeEotPath:": expected pseudoclass or pseudoelement, was " 'fontawesome-..."
(in /tmp/build/app/assets/stylesheets/application.css)
(sass):7153

Based on the error message you posted there is a syntax error in your sass file. 根据您发布的错误消息,您的sass文件中存在语法错误。 Is there a comma after that line around 7152 or 7153? 在7152或7153附近的那条线之后是否有逗号? Or maybe " ; " instead of " : " ? 或者“;”而不是“:”?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM