Search code examples
cssruby-on-railsfrontendocticons

How to set up Github Octicons in Rails?


I've installed bootstrap

gem 'bootstrap', '~> 4.0.0.alpha3'

then I downloaded octicons from https://github.com/github/octicons/ . after extracting, I copied octicons directory to app/assets/stylesheets/. Then in application.scss I added this line:

@import "octicons/octicons.scss";

But still I cant get Octicons to work. What is the correct way to set it up for my application?


Solution

  • You could use octicons-rails, instead of downloading and copying octicons manually which doesn't work with asset pipeline.

    Like what the README says:

    Add the following to your app/assets/stylesheets/application.scss:

    *= require octicons