-4

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?

SJDuk
  • 43
  • 1
  • 1
  • 5

3 Answers3

1

The easiest thing is to use the twitter-bootstrap-rails gem https://github.com/seyhunak/twitter-bootstrap-rails

bigtunacan
  • 4,873
  • 8
  • 40
  • 73
1

in your Gemfile: gem 'bootstrap-sass' and then bin/rake bundle install

nguyen
  • 71
  • 2
0

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!

dp7
  • 6,651
  • 1
  • 18
  • 37
  • I'm pretty noob to Rails. Just created a new rails app and then tried to run the command: gem 'bootstrap-sass' and got the message: Unknown command bootstrap-sass Next I used: gem install bootstrap and it now seems to be installed. After this it still didn't recognise the: gem 'bootstrap-sass' Do I still need to do this part suggested? – SJDuk Aug 19 '15 at 18:13
  • @SJD. Yes, I would suggest you to follow the above three steps. For more details, you can visit: https://github.com/twbs/bootstrap-sass – dp7 Aug 20 '15 at 18:47