Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Upgrade to bootstrap 2.1.1 #381

miggy opened this Issue Sep 21, 2012 · 11 comments


None yet
7 participants

miggy commented Sep 21, 2012

Hi, when I installed this gem a few months ago, bootstrap is at 2.0.4. How do I upgrade it to 2.1.1? Thanks!


toadkicker commented Sep 21, 2012

In your gemfile:

gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'


bundle update
rails g bootstrap:install

miggy commented Sep 21, 2012

I tried that already. In Development, looking at assets/bootstrap_and_overrides.css?body=1, it is still v2.0.4. Anything else I am missing? thx!


toadkicker commented Sep 21, 2012

Not sure what you're looking at, there isn't a version number in that file.

kretz commented Sep 24, 2012

I have the same problem. Stuck with 2.1.0 of bootstrap, even if the gem is installed containing 2.1.1 version of the less files.

By the way, Bootstrap does have its own versioning in their files, e.g. https://github.com/seyhunak/twitter-bootstrap-rails/blob/master/vendor/toolkit/twitter/bootstrap/bootstrap.less

Any ideas on why the latest files are not being served?


toadkicker commented Sep 24, 2012

Yes I know the less files from Bootstrap have a version in them. However the overrides file provided for you in the gem is not versioned because as the user you would probably version it separately.

Are you sure you aren't serving your own copy of bootstrap from somewhere else in your project? If you are pulling the repo then you should have the latest versions. Make sure in your 'Sources' tab you'll find that the bootstrap version number is preserved as you see it in this file.

You could also bust the cache in your application like so:

in app/controllers/application_controller.rb

def set_cache_buster
response.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate"
response.headers["Pragma"] = "no-cache"
response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT"

then in your whatever_controller.rb

before_filter :set_cache_buster


toadkicker commented Sep 24, 2012

Also use 'gem cleanup'

kretz commented Sep 24, 2012


When deploying to Heroku I get Bootstrap 2.1.1 as expected.
When I generate assets locally I also get Bootstrap 2.1.1.
And it seems all .js files were up to date, even if the css files are 2.1.0.

However...when I did some random clean up, by removing some unused .less files, that still did show up when loading the page - it now works. (Re-adding the .less files will not revert this.)

Was it rebuilding the main css file that was needed, or what?

Anyway, thanks for the help, and I hope this helps someone else.

@toadkicker @kretz I've added an article with tips to wiki. Hope it will be helpful.

TL;DR Bump assets version in your config/application.rb file.

miggy commented Sep 24, 2012

That worked for me. Thanks for the tips everyone!

Worked thanks! Please let us know when the updated Gem is released

cbmeeks commented Oct 21, 2012


Thanks. That wiki solved it for me. Now running 2.1.1. 👍

@seyhunak seyhunak closed this Nov 3, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment