- Download bootstrap
- Add bootstrap.js to vendor/assets/javascripts
- Add the following to app/assets/application.js
//= require bootstrap
- Add bootstrap.css to vendor/assets/stylesheets
- Add the following to app/assets/application.css
*= require bootstrap
- Add fonts to vendor/assets/fonts folder
- Add this to config/initializers/assets.rb
config.assets.paths << "#{Rails}/vendor/assets/fonts"
Rails.application.config.assets.precompile << /.(?:svg|eot|woff|woff2|ttf)\z/
- Create new stylesheet named bootstrap_override.css.erb and add the following
@font-face {
font-family: 'Glyphicons Halflings';
src: url(<%= asset_path('glyphicons-halflings-regular.eot').to_s %>);
src: url(<%= asset_path('glyphicons-halflings-regular.eot?#iefix').to_s %>) format('embedded-opentype'),
url(<%= asset_path('glyphicons-halflings-regular.woff').to_s %>) format('woff'),
url(<%= asset_path('glyphicons-halflings-regular.woff2').to_s %>) format('woff2'),
url(<%= asset_path('glyphicons-halflings-regular.ttf').to_s %>) format('truetype'),
url(<%= asset_path('glyphicons-halflings-regular.svg#glyphicons_halflingsregular').to_s %>) format('svg');
}
- Add the following to app/assets/application.css
*= require bootstrap_override