在rails 6安裝font-awesome 8 Sep 2020 參考至 此篇教學,額外透過此篇文章紀錄安裝方法。 1.首先透過 yarn 安裝 yarn add @fortawesome/fontawesome-free 2.再匯入 application.scss(也可以另外建立font-awesome.scss再額外import) #application.scss $fa-font-path: '@fortawesome/fontawesome-free/webfonts'; @import '@fortawesome/fontawesome-free/scss/fontawesome'; @import '@fortawesome/fontawesome-free/scss/solid'; @import '@fortawesome/fontawesome-free/scss/regular'; @import '@fortawesome/fontawesome-free/scss/brands'; @import '@fortawesome/fontawesome-free/scss/v4-shims'; 3.再修改 application.js import "@fortawesome/fontawesome-free/js/all"; 4.搞定 <i class="fab fa-bootstrap"></i> rails font-awesome