[Rails] How to install Font Awesome


It's very easy to introduce Font Awesome with rails, but maybe because it's too easy, it was hard to find one that describes how to do it, so I will describe it here. I tried installing gem and yarn add ~ and it collapsed for about 2 hours (laugh)

Introduction method

First, create a Font Awesome account. Font Awesome

Log in and click Manage Kit in the photo below.

スクリーンショット 2021-01-07 21.03.36.png

This will take you to the page in the photo below, so click on the part that is filled in black (it should have alphanumeric characters written on it). スクリーンショット 2021-01-07 21.04.01.png

Copy the code with Copy Kit Code !.

スクリーンショット 2021-01-07 21.04.28.png

When you're done so far, return to Rails. Put the above code in app/views/layout/application.html.erb.

スクリーンショット 2021-01-07 21.28.37.png

Font Awesome should now work! Let's write the code for FontAwesome!


Qiita: [Free teaching materials] I copied Qiita with Tailwind CSS & Rails 6 [Available for back-end exercises] Youtube: [Ruby on Rails] Introducing Font Awesome to rails buttons Adding Font Awesome to Ruby on Rails

Recommended Posts

[Rails] How to install Font Awesome
[Rails] How to install Font Awesome
[Rails] How to install devise
[Rails] How to install simple_calendar
[Rails] How to install reCAPTCHA
[Rails] How to install ImageMagick (RMajick)
How to install Swiper in Rails
How to insert icons using Font awesome
How to write Rails
How to install Docker
How to uninstall Rails
How to install docker-machine
How to install MySQL
How to install ngrok
[Ruby on Rails] How to install Bootstrap in Rails
[rails] How to post images
[Rails] How to use enum
[Rails] How to use enum
How to read rails routes
How to install Boots Faces
How to use rails join
How to terminate rails server
How to write Rails validation
How to write Rails seed
[Rails] How to use validation
[Rails] How to disable turbolinks
[Rails] How to use authenticate_user!
[Rails] How to use "kaminari"
[Rails] How to implement scraping
[Rails] How to make seed
How to write Rails routing
How to install JDK8-10 (Mac)
[Rails] How to use Scope
[Rails] How to install a decorator using gem draper
[Rails] How to use gem "devise"
How to deploy jQuery on Rails
Rails new fails to install mysql
[Rails] How to use devise (Note)
[Rails] How to use flash messages
[rails] How to display db information
How to install JMeter for Mac
[Rails] How to write in Japanese
[Rails] How to prevent screen transition
How to install ImageMagick on Windows 10
How to install ruby through rbenv
[How to install Spring Data Jpa]
How to use Ruby on Rails
How to deploy Bootstrap on Rails
[Rails] How to speed up docker-compose
Super rough! How to install Dagger2
[Rails] How to add new pages
How to install Bootstrap in Ruby
How to use Font Awesome icon for ul and li
How to install MariaDB 10.4 on CentOS 8
Rails on Tiles (how to write)
[Rails] How to write exception handling?
[Rails] How to use Active Storage
How to install WildFly on Ubuntu 18.04
How to introduce jQuery in Rails 6
[Rails] How to implement star rating
How to return Rails API mode to Rails