Font-awesome icons not rendering on Rails app

798 views Asked by At

I've already installed it with Yarn and also de font-awesome-rails gem. Also included de CDN on the head tag and import "@fortawesome/fontawesome-free/css/all" on application.js. I'm trying to render the <i class="fab fa-github"></i> icon, among others I've tried, on my landing page. However, none of these steps are rendering any icons from my view files. What could be the problem?

1

There are 1 answers

3
protoproto On

Install gem "font-awesome-rails", then in erb file, change:

<i class="fab fa-github"></i>

To:

<i class="fa fa-github"></i>

Or use this helper:

<%= fa_icon "github" %>

The github awesome icon will show.