avatar

大兜

右手寫程式,左手寫音樂

My Rails Template

Why

We engineers always hate repeating doing the same thing.

Take me for instance, everytime I create a new rails project, I edit GemFile to install lots of useful gems such as devise, carrierwave, etc, and then download Twitter Bootstrap with newest version, extract it into vendor/assets/images, vendor/assets/javascripts and vendor/assets/stylesheets, finally, replace ../img/xxx.png into xxx.png in bootstrap.css and bootstrap.min.css.

What

My template does two things:

  1. Automatically install the following gems:

    • devise
    • cancan
    • carrierwave
    • simple_form
    • dynamic_form
    • will_paginate
    • rdiscount
    • rails-i18n
  2. Download Twitter Boostrap with the newest version, and correspondingly extract files into vendor/assets/

Usage

rails new myapp -m=https://raw.github.com/gist/4010690

Alternatively, if you encounter some SSL problem during the previous command, please download the file directly and run:

rails new myapp -m=filename

Source Code

{% gist 4010690 %}