Hi I have Ruby Rails set up on Mac OSX with Homebrew and Rbenv.
I now want to play around with Bootstrap incorporated into that setup but I’m not sure how to set Bootstrap up accordingly.
Has anyone got any advice / setup guides?
Hi I have Ruby Rails set up on Mac OSX with Homebrew and Rbenv.
I now want to play around with Bootstrap incorporated into that setup but I’m not sure how to set Bootstrap up accordingly.
Has anyone got any advice / setup guides?
3
Answers
The easiest thing is to use the twitter-bootstrap-rails gem https://github.com/seyhunak/twitter-bootstrap-rails
in your Gemfile:
gem 'bootstrap-sass'
and then bin/rake bundle install
Step-1:
You need to include the Bootstrap gem in your Gemfile which you can do just by adding the following line of code:
gem ‘bootstrap-sass’
Visit the following link for more details on the bootstrap gem:
https://rubygems.org/gems/bootstrap-sass
Step-2:
Once you have added the gem to Gemfile, you just need to run the following command:
bundle install
Step-3:
Now, you are ready to import the bootstrap peoperties to your stylesheet. Just add the follwoing two @imports to your css/scss:
@import “bootstrap-sprockets”;
@import “bootstrap”;
Hope it works for you!