Bootstrap Install Guide for Rails 6 Applications

Brandon Fonnemann
5 min readMar 1, 2021

Bootstrap markets itself as the most popular HTML, CSS, and JavaScript framework for developing highly responsive, mobile first web applications. The sleek, intuitive, and powerful framework currently ranks as the tenth most popular GitHub repository with over 148,000 stars, more than 1000 contributors, and over 20,000 commits. It is compatible with a variety of frameworks (ex. Django, Express, Rails, etc).

This tutorial will walk you through adding Bootstrap functionality to a Rails application using two popular delivery methods. The framework has two dependencies — CSS and JavaScript and requires jQuery and Popper.js. Installation of these will also be covered.

Install Bootstrap via Content Delivery Network (CDN)

Photo Credit: Adobe Stock Photo

Probably the easiest way to incorporate Bootstrap in a Rails application is through a Content Delivery Network (CDN). If you elect to use this route, you don’t have to download Bootstrap. All functionality is delivered via cached versions of Bootstrap’s compiled CSS and JSS libraries from CDN links embedded in your HTML code. This can be beneficial relative to hosting libraries on your application…

--

--