Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.


Repository files navigation

Rails Boilerplate

Collections of gems / code we tend to use on about every project. Feel free to take whatever you need.

Work in progress. Not much to see for now.

I'm in a hurry, get me started

INCOMPLETE (Yup, Backstreet Boys song)

Change the __YOUR_PROJECT_NAME__ in the third line

git clone git://
cd rails-bp
perl -e "s/RailsBP/__YOUR_PROJECT_NAME__/g;" -pi $(find . -name "*.rb" -o -name "Rakefile" -o -name "*.erb" -o -name "*.ru")
git submodule update --init
cp config/capistrano-recipes/config-samples/unicorn.rb config/unicorn.rb
curl > vendor/assets/stylesheets/bootstrap.css

Edit config/deploy.rb, config/database.yml and config/unicorn.rb

Intended usage

This is intended to be used as a collection of tools to start projects quickly. This is by no mean a perfect solution and it definitey has to be customized.

Do not use this if you don't understand what's going on under the hood.

What's in included

  • Tests
  • Assets
  • Forms
    • SimpleForm
    • SimpleForm wrapper for Twitter Bootstrap (config/initializers/simple_form)
  • Production & deployment
    • Capistrano
    • Unicorn
  • Dev tools
  • Admin goodies
    • Admin base controller (app/controllers/admin/base_controller.rb).
    • Inherited Resources for DRY controller
    • Admin layout (app/layouts/admin.html.erb).
    • Admin base helper (app/helpers/admin/base_helper.rb). Includes :
      • admin_form_for : SimpleForm wrapper that defaults to Twitter's bootstrap.
      • admin_paginate : Kaminari wrapper with the Twitter's bootstrap theme.
    • Admin stylesheet that requires Twitter's bootstrap.
  • Misc


Let's stop re-inventing the wheel for admin backends. The boilerplate includes an helper to create admin forms which defaults to the Twitter Bootstrap SimpleForm wraper, and an admin base controller.

Don't want no admin? Remove ALL THE FILES:

rm -rf app/helpers/admin app/controllers/admin app/views/layouts/admin.html.erb app/assets/stylesheets/admin.css


Credits goes to all the gems contributors. Bootstrap integration is stolen from SimpleFormBootstrap


  • Move most of this stuff to generators
  • Create a CLI tool that helps setuping the boilerplate instead of copying commands
  • Write generators for more Twitter Bootstrap admin goodness


Rails Boilerplate : Collections of gems & code we tend to use on about every Rails project.






No releases published


No packages published