Adding Twitter Bootstrap to Rails (part 2)

When i last left off, i was stuck with an unideal solution for displaying form validation errors — a very important part of collecting user input on the Web. Furthermore, this unideal solution broke the form layout itself. Rather than start hacking into the source code of Rails, i decided to search the Web for other souls that wanted to “add twitter bootstrap to ruby on rails” …

This led to a discovery of the following article: Twitter Bootstrap and Rails, which proved to be an invaluable source to my edification. The key ingredient was the concept of 3rd party form builders — gems that replace the default Rails form builder. The author of the article recommended SimpleForm and Formtastic, but neither seemed to solve my problem.

My issue now is two-fold: 1) produce well-formed form validation errors and 2) deploy Twitter Bootstrap assets into my web app.

Looking at solutions for Problem #2 first, i found a number of gems that purport to be a solution:

And there are even more. And yes, we are going to go over each one. You see, the one common feature i have observed from the number of blogs that discuss combining Bootstrap with Rails don’t seem to discuss Problem #1.

To be continued …