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
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
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.
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With