Install Bootstrap gem in rails app

Total Blog Views: 47

Blog Status: publish

Created By: asad_fazlani Created at: 08-16-2021

Tags: rails gem bootstrap

Installation of Bootstrap gem in rails app step by step :

Add below code in gem file 

gem 'bootstrap', '~> 5.1.0'
gem 'jquery-rails

using bundle install gem in your project.

import bootstrap styles in application.scss

@import "bootstrap";

make sure file extention must be .scss(saas). if you create app they came with .css then rename it.

Add Bootstrap dependecies to your application.js.

//= require jquery3
//= require popper
//= require bootstrap

we successfully install bootstrap in our rails app.

Feel free to ask any questions in comment.

 


asad_fazlani

Technical Blogger at shadbox



Comments



  • yego | almost 4 years ago
    Easy steps to add bootstrap, thanks for sharing
  • swazahmad | almost 4 years ago
    Awesome Information Thanks For Sharing
  • swazahmad | almost 4 years ago
    Awesome Information Thanks For Sharing
Buy traffic for your website

About Shadbox

we have the “Get things executed” lifestyle at our place of work. There are not any excuses, no if’s or however’s in our dictionary. committed to navigating the ship of creativity to create cell answers, we resolve the real-lifestyles troubles of our clients and their clients. Our passion for work has won us many awards, year after 12 months.

Services

Downloads