Reputation: 27192
In my rails 3.0.10 I would like to use Bootstrap from Twitter but I only found examples using Rails 3.1 and the Asset Pipeline. How would add it to my 3.0 application? Do I just download it from the main site and put the files inside of my public folder? What about using LESS?
Upvotes: 3
Views: 986
Reputation: 12252
See this railscasts video: Twitter Bootstrap Basics. There is another follow-up screencast after you finish this one.
Upvotes: 2
Reputation: 20049
We converted bootstrap to use SASS (think I found it in a github repo somewhere), and included it in the lib/assets/
folder.
Our application.css includes the partials. We've made a few custom modifications to the partials, works just fine.
Version 2 will be converted to SASS pretty sure I'm sure, but in the meantime there are asset pipeline modules available for LESS which you could add so that your rails app understands less files:
A quick search found this (can't vouch for it at all)
https://github.com/metaskills/less-rails
If it works as described you could just drop in bootstrap as it is and reference it in your application.css file.
Upvotes: 0
Reputation: 12273
The absolute simplest way is to drop the boostrap.css
file into your public folder and then reference it in your layouts/application.html.erb
file. Then you can start using it right away. You're a bit limited at that point in what you can modify but that will get you started.
What is your question about LESS? bootstrap uses LESS but you don't have to worry about that since you're just using a plain ole css file.
Upvotes: 2