Ruby Templates

Quick-start aids.

Originally published 2006

Once you’ve begun finding out how things work, you need some code fragments you can read and reuse.


Rakefiles gathered from the web. (Apologies. I should have copied the files, rather than linking to them. All but one seems to have disappeared!)

  1. Rakefile that loops over a specified list of files (my copy).
    (It is also possible to dynamically generate the list of files to operate on, using standard Ruby code.)
  2. Rakefile to build a prototype
  3. Rakefile for a project build
  4. Rakefile that generates version numbers for each build
  5. Rakefile for building Rails gems
  6. Rakefile for the ActiveRecord part of the Rails project

Basic Templates

A template does the basic things you need to do in an application: Handle command line arguments, print usage instructions, and implement a main method. These are initial efforts. I expect things to change as I learn more:

Code Fragments

Copyright © 2006-2017, TreeLight PenWorks

Please share!

Add your thoughts...

This site uses Akismet to reduce spam. Learn how your comment data is processed.