【问题标题】:Deployment to heroku failed - Sass::SyntaxError: File to import not found or unreadable: font-awesome部署到 heroku 失败 - Sass::SyntaxError: File to import not found or unreadable: font-awesome
【发布时间】:2016-09-20 16:02:28
【问题描述】:

我正在尝试将一个 rails 网站推送到 heroku,但不断收到错误 rake 中止! Sass::SyntaxError: 找不到或无法读取要导入的文件:font-awesome。 (萨斯):7025
预编译资产失败。 Push 被拒绝,无法编译 Ruby 应用。

应用程序在本地运行完美。我是 Rails 新手,因此感谢所有帮助。谢谢!

【问题讨论】:

标签: ruby-on-rails heroku


【解决方案1】:
RAILS_ENV=production bundle exec rake assets:precompile
git add public/assets
git commit -m "vendor compiled assets"

然后再试一次

【讨论】:

    【解决方案2】:

    好的 - 这很奇怪......我添加了代码 @import "font-awesome";到 application.scss 和 gem 'font-awesome-sass' 到我的 gem 文件......然后繁荣它工作......有趣的是,本地我也需要代码 @import "font-awesome";在我的 application.css 文件中......但现在它可以工作了......

    【讨论】:

      猜你喜欢
      • 2016-04-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-15
      • 2017-09-13
      • 2015-12-14
      • 1970-01-01
      • 2014-11-07
      相关资源
      最近更新 更多