Adam Anderson

Adding Bootstrap 3.0.0 WIP to your Rails app


By Adam Anderson



Tweet Like Share

As I have begun to include Bootstrap 3.0.0 (and especially it's new responsive mobile framework) into my web application development, it has become clear that someone needs to DRY this process up. So I quickly built a simple gem to do this: Bootstrap-Rails-Three.

Version 3.0.0 of Bootstrap contains some really powerful new capabilities, as well as some good-looking updates to the CSS itself. That said, it should be noted that v.3.0.0 is a work in progress and is subject to bugs and/or breaking changes. It should be used in production apps at your own peril.

Installation

Installation is simple. Just add this line to your application's Gemfile:

    gem 'bootstrap-rails-three', :github => 'asanderson15/bootstrap-rails-three', :branch => 'master'

And then execute:

    $ bundle install

Or install it yourself as:

    $ gem install bootstrap-rails-three

Usage

Once the gem is installed, add the following code to your application.css and application.js files:

app/assets/javascripts/application.js

//= require twitter/bootstrap

app/assets/stylesheets/application.css

*= require twitter/bootstrap

Is this useful for you?

I hope this is useful for other developers trying to experiment with the new Bootstrap 3.0.0. If you have any comments or questions, don't hesitate to contact me on Twitter. If people show a lot of interest, I will try to be more diligent about keeping it up to date with the latest updates to Bootstrap as it continues towards a release version.



comments powered by Disqus

Written by Adam Anderson. Published with GitHub Pages.