bokmann / font-awesome-rails

the font-awesome font bundled as an asset for the rails asset pipeline
http://fortawesome.github.com/Font-Awesome/
MIT License
1.86k stars 244 forks source link

Rails 6.1.3.1 - icons are not being loaded with Bulma #221

Open stephenhuey opened 3 years ago

stephenhuey commented 3 years ago

Font Awesome icons are not being loaded when using the Bulma CSS framework although Bulma expects it to work. My app is running on Ruby 3 with Rails 6.1.3.1 and this is in my Gemfile:


gem "bulma-rails", "~> 0.9.1"
gem "font-awesome-rails", "4.7.0.6"

I initially tried font-awesome-rails with no version (the latest version). Here is my application.scss file:


@import "bulma";
@import "font-awesome";

Rubymine says Cannot resolve file 'font-awesome' and I'm really not sure of the cleanest way to get icons showing up in my browser.

Any ideas?

Originally posted by @stephenhuey in https://github.com/bokmann/font-awesome-rails/issues/210#issuecomment-825039530

brayandiazc commented 2 years ago

@stephenhuey This option works for me, add into your styles file the following line.

*= require font-awesome

It doesn't matter if your file is .css or scss.