whatisgithub

What is bootstrap-rubygem?

twbs/bootstrap-rubygem — explained in plain English

Analysis updated 2026-05-18

2,041SCSSAudience · developerComplexity · 2/5Setup · moderate

In one sentence

The official Ruby gem that packages Bootstrap 5 so Ruby and Rails projects can pull in its styles and components through the standard asset pipeline.

Mindmap

mindmap
  root((Bootstrap Ruby Gem))
    What it does
      Packages Bootstrap 5
      Ruby gem distribution
      Asset pipeline integration
    Tech stack
      Ruby
      SCSS
      Sprockets
      Importmaps
    Use cases
      Adding Bootstrap to Rails
      Trimming unused components
      Choosing a Sass processor
    Audience
      Ruby developers
      Rails developers
    Limitations
      No Webpack support
      Bootstrap 5 only

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add Bootstrap 5 styles and JavaScript to a Rails app without manually downloading files.

USE CASE 2

Trim the CSS bundle by commenting out unused Bootstrap components in a template file.

USE CASE 3

Choose a compatible Sass processor for your specific Rails and Ruby version.

USE CASE 4

Migrate from an older Bootstrap version using the separate bootstrap-sass package if needed.

What is it built with?

RubySCSSSprocketsImportmaps

How does it compare?

twbs/bootstrap-rubygematom/flight-manual.atom.ioemilbaehr/automatic-app-landing-page
Stars2,0416523,631
LanguageSCSSSCSSSCSS
Last pushed2022-12-06
MaintenanceDormant
Setup difficultymoderatemoderateeasy
Complexity2/51/51/5
Audiencedevelopergeneralvibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires choosing a compatible Sass processing library based on your Rails and Ruby version.

No license information is given in the README.

So what is it?

This is the official Ruby gem that packages Bootstrap 5, a popular front-end styling toolkit, for use in Ruby-based web applications. Rather than downloading Bootstrap files manually, Ruby developers can add this gem to their project and have Bootstrap's styles and JavaScript components available automatically through the standard asset pipeline. The gem is specifically intended for projects using Sprockets or Importmaps, which are the older and newer ways Rails handles CSS and JavaScript files. It does not support Webpack-based setups, which are common in newer Rails projects that use separate JavaScript bundlers. Installation involves adding the gem to the project's dependency list, choosing a compatible Sass processing library (the README gives four options depending on your Rails version and Ruby version), then importing Bootstrap into your main stylesheet file with a single line. The gem handles the rest, making Bootstrap's design variables, layout utilities, and interactive components available throughout the app. The README also explains how to selectively include only the Bootstrap components you need. By copying a template file and commenting out sections, you can trim the amount of CSS that gets loaded, which can improve page load times for larger applications. This gem covers Bootstrap 5. If you need Bootstrap 2 or 3, the README points to a separate older package called bootstrap-sass.

Copy-paste prompts

Prompt 1
Show me how to add this gem to a Rails project using Sprockets or Importmaps.
Prompt 2
Explain the difference between the four Sass processing library options mentioned in the README.
Prompt 3
Help me trim down the Bootstrap CSS my app loads by disabling components I don't use.
Prompt 4
Walk me through why this gem does not support Webpack-based Rails setups.

Frequently asked questions

What is bootstrap-rubygem?

The official Ruby gem that packages Bootstrap 5 so Ruby and Rails projects can pull in its styles and components through the standard asset pipeline.

What language is bootstrap-rubygem written in?

Mainly SCSS. The stack also includes Ruby, SCSS, Sprockets.

What license does bootstrap-rubygem use?

No license information is given in the README.

How hard is bootstrap-rubygem to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is bootstrap-rubygem for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.