Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Best Practices: Installing and Customizing Twitter Bootsrap

I am currently working on a small project and am trying to determine the best way to install twitter bootstrap.

These are the two options I know:

1) The ways explained in the RoR videos, drag the proper css/html/image folders into your project, bundle install etc.

2) I have also been working through a tutorial through skillshare and they suggest installing a bootstrap sass gem.

What are the advantages/disadvantages of these two methods? Am I missing any features in boostrap with either one?

Lastly, I want to customize bootstrap. I read a great article: http://coding.smashingmagazine.com/2013/03/12/customizing-bootstrap/ about how to customize bootstrap. For example, you can use the customize section on the bootstrap site and input your own values, use bootswatr, or other customization tools.

Depending on how I install bootstrap, will it impact the amount I can customize my project?

Thanks :)

1 Answer

The best way to include Bootstrap (or indeed any CSS) is with a Gem (assuming it's well maintained) because the Gem is versioned. Updating is a matter of changing a number in the Gemfile or calling bundle update <my Gem name> Rather than copying a pasting files in your project - no thanks! Bonus you can work with SASS as well whereas native Bootstrap is Less.

That said, it's worth doing both ways as it adds to your experience and sometimes you don't get the luxuary of a well maintained Gem. However, I don't see the point with Bootstrap which has a well maintained Gem. I belive that you customize the changes by adding code either before or after the Bootstrap include (I forget). I certainly customized it without any big issues.

I think I used twitter-bootstrap-rails but it's been a while... certainly a popular and maintained Gem.

Rich

Thanks Rich. Yeah there is a customization feature for a lot of the basic layout such as background color, link color, forms, etc.

Thanks for the response, now I know I'm not doing anything too terribly wrong haha, thanks!