source"https://token:[email protected]/basic/fontawesome-pro/ruby/"do
gem "font-awesome-pro-sass", "VERSION"
end
Time to Bundle
In the terminal and in your project folder:
bundle install
Import Font Awesome
Add the following to the app/assets/stylesheets/application.css.scss file:
@import "font-awesome";
@import "font-awesome-pro";
Huh, where's the application.css.scss file?
If the app/assets/stylesheets/application.css.scss does not exist then rename the app/assets/stylesheets/application.css and add the @import "font-awesome" statement below the *= require statements but outside of the comment block.
Style Time
Next, you need to choose which style of icons you want to use in your project. You may import any number of the styles. Font Awesome has the following styles:
# Nothing additional needed to install for free icons.# Brands, free solid, and free regular icons are included with the import above.
Note: the icon helper can take a hash of options that will be passed to the content_tag helper
Other Ruby Projects
The path.scss file contains a function for using the font-path function if found. If the function is not found it will use the $fa-font-path variable for the path to the webfont files. You can override this variable to where your framework will store the webfonts files.
Advertisement
Remove ads with a Pro plan!
Using this requires Font Awesome Pro
Pro
A subscription to a Pro-level plan will remove all third-party advertisments on fontawesome.com.
And of course Pro-level plans come with…
All 16,083 Icons in Font Awesome
Solid, Regular, Light, Thin, and Duotone Styles for Each Icon + Brands
A Perpetual License to Use Pro
Services and Tools to Make Easy Work of Using Icons