Upgrading the twitter bootstrap gem from 2.x to 3.x or 4.x is breaking the UI styles

838 views Asked by At

I am trying to upgrade the twitter-bootstrap-rails gem version from 2.2.8 version to 3.2.2 version since 2.2.8 has vulnerabilities.

But while upgrading the gem version it is breaking the UI styles everywhere in the application nav-bar, search, and modal box, etc.

I followed the steps given in the official documentation by running this command rails generate bootstrap:install less after doing the bundle install.

Is there any other configurations that we need to change other than this? I thought it will be a simple gem upgrade but not sure where things are going wrong.

Any help would be appreciated. Thanks.

1

There are 1 answers

4
ThorstenC On

You should have a look at the GetBoostrap documentation (the successor of "Twitter Bootstrap) and should install the

gem 'bootstrap', '~> 4.5.0'

The migration guide is here : https://getbootstrap.com/docs/4.5/migration/