claudeers.
// Uncategorized / Others

twitter-bootstrap-rails

Twitter Bootstrap for Rails 8

Install with your AI

Paste into Claude Code, Cursor, or any agent — it reads the repo and wires the tool into your project.

Install and set up twitter-bootstrap-rails (git-clone project) into my current project.
Found on https://claudeers.com/twitter-bootstrap-rails
Repo: https://github.com/seyhunak/twitter-bootstrap-rails
Homepage/docs: https://github.com/seyhunak/twitter-bootstrap-rails
Detected install method: git-clone → git clone https://github.com/seyhunak/twitter-bootstrap-rails
Category: uncategorized. Platforms: api, mobile.
Read the repo's README for exact setup and env vars, then install it and wire it into my project.

Claudeers Health Verdict:
unknown; community-verified: false. Confirm the source before running anything.
// or clone
git clone https://github.com/seyhunak/twitter-bootstrap-rails

// compatibility

Platformsapi, mobile
Operating systems—
AI compatibilityclaude
License—
Pricingopen-source
LanguageRuby

Get your FREE $2.50 API credits to access TickAtlas financial data ↗

twitter-bootstrap-rails

Integrates Bootstrap 5.3.8 into Rails Asset Pipeline. Supports Rails 8, 7, 6, 5. Tested against Rails 8.1.4.1 and 8.0.5.2.

Upgrade Rails. Rails 8.1.4.1 and 8.0.5.2 fix 21 security issues, and the Rails team strongly recommends upgrading as soon as possible. This gem's dependency range still allows older Rails versions, so installing it won't upgrade Rails for you. Run bundle update rails in your app. Security support for Rails 8.0 ends on 7 November 2026, and older series are already unsupported.

Install

# Gemfile
gem "twitter-bootstrap-rails"
bundle install
rails generate bootstrap:install static

Generators

Every code snippet on the Bootstrap 5.3 Introduction page is reproducible from a command:

Docs snippetCommand
Starter templaterails g bootstrap:starter
CDN CSS <link>rails g bootstrap:cdn --css
CDN JS bundle <script>rails g bootstrap:cdn --js
Popper + bootstrap.js separatelyrails g bootstrap:cdn --separate-popper
Important globals (doctype, lang, viewport)baked into every generated layout and the starter template
# Install Bootstrap assets into the asset pipeline
rails g bootstrap:install static

# ...or load Bootstrap from the jsDelivr CDN instead
rails g bootstrap:install cdn

# Generate a Bootstrap layout
rails g bootstrap:layout application

# ...linking Bootstrap from the CDN, with Subresource Integrity
rails g bootstrap:layout application --cdn

# ...using Popper and bootstrap.js separately rather than the bundle
rails g bootstrap:layout application --cdn --separate-popper

# Write the starter template from the Bootstrap docs
rails g bootstrap:starter                    # -> public/bootstrap-starter.html
rails g bootstrap:starter --path=public/demo.html

# Print CDN tags to paste into a layout you already own (writes nothing)
rails g bootstrap:cdn

# Generate themed views for scaffold
rails g scaffold Task title:string done:boolean
rails db:migrate
rails g bootstrap:themed Tasks

bootstrap:install cdn records the choice in config/initializers/bootstrap.rb, so bootstrap:layout emits CDN tags by default afterwards. Pass --cdn or --no-cdn to override it per run.

Both asset pipelines are supported. On Sprockets, static adds require directives to your manifests. On Propshaft (the Rails 8 default) there are no directives to add, so the generated layout links the vendored files directly — run rails g bootstrap:layout after bootstrap:install static either way.

The Bootstrap version and its CDN URLs and integrity hashes live in one place, Twitter::Bootstrap::Rails::BOOTSTRAP_CDN. No template hardcodes them.

Snippets

Every snippet published at getbootstrap.com/docs/5.3/examples — 62 of them across 12 categories — is a command. Each writes an .html.erb partial into app/views/shared/:

rails g bootstrap:header               # the first variant, "centered"
rails g bootstrap:header dark_search   # a specific variant
rails g bootstrap:header --list        # what's available, with descriptions
CommandVariants
rails g bootstrap:headercentered, nav_pills, with_auth_buttons, dark_search, light_search, grid_dropdown, double, dark_double
rails g bootstrap:herocentered, centered_screenshot, with_image, signup_form, cropped_image, dark
rails g bootstrap:featurescolumns_with_icons, hanging_icons, custom_cards, icon_grid, with_title
rails g bootstrap:sidebardark, light, icon_only, collapsible, list_group
rails g bootstrap:footersimple, with_brand, with_nav, columns, with_newsletter
rails g bootstrap:dropdownsimple, with_search, with_icons, calendar, mega_menu
rails g bootstrap:list_groupwith_avatars, checkboxes, checkboxes_expanded, checkable, radios
rails g bootstrap:modalsheet, confirm, whats_new, signup
rails g bootstrap:badgepills, subtle, subtle_bordered, with_avatar, with_icons, with_avatar_divider
rails g bootstrap:breadcrumbbasic, with_icons, chevron, custom
rails g bootstrap:buttonpills, grid, with_icons, loading, circle
rails g bootstrap:jumbotronwith_icon, placeholder, full_width, basic

Variants are listed in the order they appear on the docs page, so the first one in each row is the first example Bootstrap shows.

Options, on every snippet command:

OptionEffect
--listPrint the variants with descriptions and exit, writing nothing
--jsonPrint the variants as JSON and exit, writing nothing
--as=NAMEPartial name to write (default: the generator name)
--path=DIRWhere to write it (default: app/views/shared)
--no-iconsSkip installing the shared icon sprite
rails g bootstrap:footer columns --as=site_footer --path=app/views/layouts
# -> app/views/layouts/_site_footer.html.erb

Placeholder images

Five snippets (hero centered, hero centered_screenshot, hero with_image, hero cropped_image, features custom_cards) reference placeholder images that only exist on Bootstrap's docs site, so they 404 until you point them at your own assets. The generator warns you when you pick one.

Icons

36 of the 62 snippets use Bootstrap Icons through an SVG sprite. Those commands also write _bootstrap_icons.html.erb next to the partial. Render it once, near the top of <body> in your layout, or those icons come out as empty boxes:

<%= render "shared/bootstrap_icons" %>

Coding agents

Agents like Claude Code, Cursor and Codex often write outdated Bootstrap from memory or guess at an app's asset setup. These commands let them use what this gem already knows instead. The gem doesn't call any AI service and needs no API key.

rails g bootstrap:agent          # write a guide tailored to this app
rails g bootstrap:doctor         # check how Bootstrap is set up
rails g bootstrap:doctor --json  # the same report, for agents and CI
rails g bootstrap:header --json  # list a snippet's variants as JSON

bootstrap:agent writes .claude/skills/bootstrap-rails/SKILL.md and a section in AGENTS.md, keeping anything else in that file. Run it again after upgrading the gem or changing your asset setup. Use --no-claude or --no-agents to skip either one.

bootstrap:doctor writes nothing and exits 1 if a check reports an error, so it also works as a CI step. It checks:

CheckLooks for
bootstrap_css, bootstrap_jsWhether your layouts actually load Bootstrap, on Propshaft, Sprockets or the CDN
bootstrap_versionCDN tags or vendored files on a different version from the one this gem ships
icon_spriteThe sprite being installed but never rendered, or rendered more than once
placeholder_imagesDocs-site images left in your views
legacy_markupMarkup from older Bootstrap versions in app/views, app/helpers and app/components, with file, line and replacement

In an existing app, legacy_markup works as a migration to-do list. Plain names like close or well may be your own CSS classes, so check those before changing them. If Bootstrap comes from package.json or your importmap, the doctor warns that it can't verify it rather than reporting an error.

Quick Start

rails new myapp
cd myapp
echo 'gem "twitter-bootstrap-rails"' >> Gemfile
bundle install
rails generate bootstrap:install static
rails generate scaffold Task title:string description:text completed:boolean
rails db:migrate
rails generate bootstrap:themed Tasks
rails generate bootstrap:layout application
rails server

Run bootstrap:layout even if you already have a layout — that step is what puts Bootstrap's CSS and JS on the page.

Upgrading to 5.5.0

5.5.0 changes the HTML that the view helpers produce. They were still writing Bootstrap 3 markup, so toggles, dropdowns and close buttons did nothing on Bootstrap 5. If you have custom CSS or tests built on the old output, you'll need to update them:

  • nav_bar and the menu helpers use navbar-expand, nav-item and nav-link, and menu_item puts active on the link rather than the li.
  • drop_down_submenu renders a labelled group, because Bootstrap 5 has no nested dropdowns.
  • badge and tag_label render badge text-bg-*.
  • render_breadcrumbs renders nav > ol.breadcrumb, and :divider_class no longer applies.

See the CHANGELOG for the full list. rails g bootstrap:doctor finds older Bootstrap markup in your own views and helpers.

Upgrading to 5.4.0

5.4.0 is a breaking release:

  • Less is gone. rails g bootstrap:install less no longer exists; the argument is now static (default) or cdn. Bootstrap 5 has no Less build, and the less-rails and execjs dependencies have been dropped.
  • Glyphicons are gone, including the glyph helper. Bootstrap dropped them in v4. The snippet generators ship Bootstrap Icons instead.
  • CoffeeScript support is gone, along with --no-coffeescript.
  • The gem version no longer tracks the Bootstrap version. Twitter::Bootstrap::Rails::BOOTSTRAP_VERSION says which Bootstrap ships.

If you are on Rails 8, note that bootstrap:install static previously left Propshaft apps with no Bootstrap at all — that is fixed here. See the CHANGELOG for the full list.

Buy me a Coffee

☕ Support the Project

Contributors

Thanks to all contributors who are helping to make better.

twitter-bootstrap-rails

Star History

Star history of seyhunak/twitter-bootstrap-rails over time

License

MIT. Copyright (c) 2025 (since 2011) by Seyhun Akyürek

// faq

What is twitter-bootstrap-rails?

Twitter Bootstrap for Rails 8. It is open-source on GitHub.

Is twitter-bootstrap-rails free to use?

twitter-bootstrap-rails is open-source, so it is free to use.

What category does twitter-bootstrap-rails belong to?

twitter-bootstrap-rails is listed under uncategorized in the Claudeers registry of Claude-compatible tools.

7 views
★ 4,460 stars
unclaimed
updated 13 days ago

// embed badge

twitter-bootstrap-rails on Claudeers
[![Claudeers](https://claudeers.com/api/badge/twitter-bootstrap-rails.svg)](https://claudeers.com/twitter-bootstrap-rails)

// retro hit counter

twitter-bootstrap-rails hit counter
[![Hits](https://claudeers.com/api/counter/twitter-bootstrap-rails.svg)](https://claudeers.com/twitter-bootstrap-rails)

// reviews

// guestbook

0/500

// related in Uncategorized / Others

🔓

Reverse engineer anything with agents, from app behavior down to native binaries.

// uncategorizedmorluto/⟨TypeScript⟩★ 468,336◷ MIT[ claude ]
🔓

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

// uncategorizedn8n-io/⟨TypeScript⟩★ 211,436◷ NOASSERTION[ claude ]
🔓

The agent engineering platform.

// uncategorizedlangchain-ai/⟨Python⟩★ 149,929◷ MIT[ claude ]
🔓

100+ AI Agent & RAG apps you can actually run — clone, customize, ship.

// uncategorizedShubhamsaboo/⟨Python⟩★ 144,747◷ Apache-2.0[ claude ]

// built by

→ see how twitter-bootstrap-rails connects across the ecosystem