← Back to writing

Bootstrap Glyphicons won’t show up in Rails

Bootstrap glyphicons vanishing in your Rails app? The asset pipeline is almost always the culprit. A short fix that saves the afternoon.

Bootstrap Glyphicons won’t show up in Rails

If you are having issues with the Glyphicons showing up in your Rails project. Add this line to the top of your file where you are importing Bootstrap. Make sure it is above the import ‘bootstrap’ line.

$icon-font-path: 'bootstrap/';
@import 'bootstrap';

Additionally if you have the issue above you may need to use if you want to push to Heroku.

 config.assets.compile = true

in your /config/environments/production.rb

that flag is defaulted to false. This should fix the issues with Glyphicons not showing on development and for Heroku.