Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CodeBrotha/e7d22e5de45a7c897284d9458b024311 to your computer and use it in GitHub Desktop.
Save CodeBrotha/e7d22e5de45a7c897284d9458b024311 to your computer and use it in GitHub Desktop.
Add Bootstrap to your Rails app without a Gem

Bootstrap 3.0 in Rails without a Gem

What is Bootstrap?

It's a collection of CSS styles and Javascript add-ons that stop your site from looking like a shitty craigslist rip off from 1996. Seriously, who wants that?

Docs: CSS, Components, Javascript

Why Install It This Way?

Finding the right gem, keeping it updated, and learning the syntax is a pain in the ass. Why not install Bootstrap the way you'd install new javascript libraries?

Instructions

  1. Cut a hole in that box...ahem. Download Bootstap 3.0 here
  2. Copy everthing in Bootstrap/dist/css/min to RAILS_APP_DIR/vendor/assests/stylesheets
  3. Copy everthing in Bootstrap/dist/js/min to RAILS_APP_DIR/vendor/assests/javascripts
  4. Add *= require bootstrap-theme.min.css to application.css
  5. Add *= require bootstrap.min.css to application.css
  6. Add //= require bootstrap.min.js to application.js
  7. ....
  8. PROFIT

Use

Go over the docs to see how you can pretty-fy the divs / headers you're already using. There will be some changes that will happen instantly. Happy de-uglify-ing :-]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment