Reputation: 4201
I'm trying to migrate from Bootstrap 2, to version 3 RC1 in a Rails 4 project.
Initially I used bootstrap-sass gem 2.3.2 and everything worked smoothly.
How can i add Boostrap 3 to my project now? I can't find any gem already converted to SASS and the official documentation tells to compile it into CSS from LESS.
I'm fairly new to all of this so i'm really getting confused here, any help?
UPDATE Seems like the gem i was using in the first place has been finally updated: https://github.com/twbs/bootstrap-sass
Upvotes: 20
Views: 26208
Reputation: 341
There is already release candidate that you can use, add to GemFile:
gem 'bootstrap-sass', github: 'thomas-mcdonald/bootstrap-sass'
Additionally if you upgrade from bootstrap 2 then you have to remove previous gem before.
Upvotes: 17
Reputation: 9874
And somehow nobody mentioned http://alademann.github.io/sass-bootstrap/ and I wonder why.
Upvotes: 0
Reputation: 386
Ther is a twitter bootsrap 3 gem : https://github.com/yabawock/bootstrap-sass-rails
Upvotes: 1
Reputation: 557
try using https://github.com/anjlab/bootstrap-rails
by adding the following to your Gemfile:
gem 'anjlab-bootstrap-rails', :require => 'bootstrap-rails',
:github => 'anjlab/bootstrap-rails',
:branch => '3.0.0'
In your application.js add the following:
//= require twitter/bootstrap
In your application.css add the following before anything else:
*= require twitter/bootstrap
Upvotes: 29
Reputation: 12402
Since you are already using bootstrap-sass gem
I'd recommend this
http://github.com/thomas-mcdonald/bootstrap-sass/tree/3
Upvotes: 2
Reputation: 255
I tried the solution suggested by ShenoudaB and got it to work just fine. Things I needed to change from the previous version were:
I also noticed that some of the styles changed. Check the new documentation and make sure your class names match the new ones.
That's all I did and it worked for me. Good luck getting your app to work!
Upvotes: 6