Rails Engine - File to import not found or unreadable: font-awesome

我的梦境 提交于 2019-12-01 17:58:07

Install font-awesome-sass instead:

gem 'font-awesome-sass', '~> 4.4.0'

Bundle it:

bundle install

Add the following to your application.css.scss (app/assets/stylesheets):

@import "font-awesome-sprockets";
@import "font-awesome";

As a test you can add the following line to your view to see if it works:

<%= icon('thumbs-up', 'It Worked!!!', id: 'my-icon', class: 'fa-5x') %>

I had this issue , with the below message :

Sass::SyntaxError at /
File to import not found or unreadable: font-awesome-sprockets.
Load paths:
  /home/user/shop_app/depot2/app/assets/images
  /home/user/shop_app/depot2/app/assets/javascripts

And fixed it by updating the gem to include the version :

changed from:

 gem 'font-awesome-sass'

to:

gem 'font-awesome-sass', '~> 4.4.0'
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!