prajeesh
prajeesh

Reputation: 2382

Upgrading bootstrap version - twitter-bootstrap-rails

I am using bootstrap gem in my project.

gem 'twitter-bootstrap-rails'

The bootstrap version that i have now is

/*! normalize.css v3.0.1 | MIT License | git.io/normalize */

I need to upgrade to latest bootstrap version.

It seems like the bootstrap version is not updated in the gem (https://github.com/seyhunak/twitter-bootstrap-rails/blob/master/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb).

How can i upgrade the version in my application?

Upvotes: 2

Views: 655

Answers (1)

Martin
Martin

Reputation: 4222

There are several options:

  1. You can fork twitter-bootstrap-rails gem, update BS to version 4 and edit your Gemfile:

    gem 'twitter-bootstrap-rails', git: 'link_to_your_fork'
    
  2. You can migrate to bootstrap-rubygem gem instead which uses BS4

  3. You can download latest version of BS from official site and manually put .js and .css files to ./vendor/assets/ directory. Look at these SO answers for reference: first and second

For options 2 and 3 make sure you dont use helper methods in your code which twitter-bootstrap-rails gem provides

Upvotes: 1

Related Questions