Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Upgrade to bootstrap 2.1.1 #381

Closed
miggy opened this Issue · 11 comments

7 participants

@miggy

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

In your gemfile:

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

then

bundle update
rails g bootstrap:install

@miggy

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

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

@kretz

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

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"
end

then in your whatever_controller.rb

before_filter :set_cache_buster

@toadkicker

Also use 'gem cleanup'

@kretz

Update:

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.

@kugaevsky

@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

That worked for me. Thanks for the tips everyone!

@delwaterman

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

@cbmeeks

@kugaevsky

Thanks. That wiki solved it for me. Now running 2.1.1. :+1:

@seyhunak seyhunak closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.