简体   繁体   中英

Deployment to heroku failed - Sass::SyntaxError: File to import not found or unreadable: font-awesome

I'm trying to push a rails website to heroku but keep getting an error rake aborted! Sass::SyntaxError: File to import not found or unreadable: font-awesome. (sass):7025
Precompiling assets failed. Push rejected, failed to compile Ruby app.

The app run perfect local. I'm new to rails so all help is appreciated. Thanks!

RAILS_ENV=production bundle exec rake assets:precompile
git add public/assets
git commit -m "vendor compiled assets"

Then try again

Okay - this is strange.... I added code @import "font-awesome"; to application.scss and gem 'font-awesome-sass' to my gem file... and boom it works... Funny thing is that local I also need code @import "font-awesome"; in my application.css file... but now it works..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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