0

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.

Eyeslandic
  • 14,553
  • 13
  • 41
  • 54
Chintu Karthi
  • 137
  • 2
  • 12

1 Answers1

0

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/

ThorstenC
  • 1,264
  • 11
  • 26
  • I added the gem as suggested, but it's throwing the following error `ExecJS::RubyRacerRuntime is not supported. Please replace therubyracer with mini_racer in your Gemfile or use Node.js as ExecJS runtime.` I need the rubyracer gem so even If I try to replace it with mini_racer, it's throwing an error `activesupport-6.0.3.1/lib/active_support/dependencies.rb:324:in require: cannot load such file -- v8 (LoadError)` – Chintu Karthi Jun 15 '20 at 07:04
  • 1
    And also what you are suggesting is changing from twitter-bootstrap-rails gem to bootstrap. This involves moving from less to sass. And we try to keep them in less itself. So I believe this is different from what I am expecting. – Chintu Karthi Jun 15 '20 at 07:12
  • You 're right I thought going to bootstrap might be the best choice. – ThorstenC Jun 15 '20 at 12:41
  • 1
    Yeah, that would be right. But I would like to stick with `twitter-bootstrap-rails` for now. Thanks for your suggestion though :) – Chintu Karthi Jun 15 '20 at 14:43