Font Awesome has an official Ruby on Rails(opens new window) gem for free and pro icons.
How to Install
There are different ways to install the free version vs. the pro version.
Add the Font Awesome Ruby gem to your
Time to Bundle
In the terminal and in your project folder:
Import Font Awesome
Add the following to the
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:
Add Those Icons
Feeling your oats, add icons using the Rails helper function:
Alright Stop, Animate, and Listen
Want to animate or change the size of your icons? Here's how:
Or animate with the Rails helper function:
Note: the icon helper can take a hash of options that will be passed to the content_tag helper
Other Ruby Projects
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.