New to Rails 3? Check out the Ruby on Rails 3 Tutorial book and screencast.

A book and screencast series showing you how to develop and deploy industrial-strength Rails apps in a direct, step by step way. The screencast series includes 12 lessons over more than 15 hours! Get the best "over the shoulder" experience of following what a top Rails 3 developer does when building an app today. Click here to learn more.

suprails and rg: Two Rails Application Generators

In Tools

generator.png Most Rails developers are familiar with the repetitive grunt work between running the rails command and starting in on custom code: adding plugins, setting up git, initializing Capistrano, bringing in your usual custom rakefile, and so on. There are projects that provide a "Rails-plus" starter application with common stuff baked in (like Bort), but if you use one of those you're limited to what the developer thought you should add, unless you start fixing up the source code yourself.

Two new projects, suprails and rg, take a different approach to Rails application generating. They're both template-driven application generators that take a configuration file describing what you want to build and then go build it. Either one can make a new Rails application, bring in plugins, set up a git repository, run generators, and so on. The idea is that you set up your configuration once, and then just generate applications from it.

Suprails uses plain text files with a list of commands for its templates. The syntax for rg templates is more ruby-ish, with a template class containing nested tasks. Both projects are in the early days yet, but either one will already help you get rid of the repetitive work if you create many Rails applications.

Post to Twitter Tweet This Post

Vaguely Related Posts (Usually)

3 Comment Responses to “suprails and rg: Two Rails Application Generators”

  1. #1
    Bradley Grzesiak Says:

    Thanks for the mention of suprails! It's still in early development but is definitely functional.

    I just wanted to mention that while the suprails configuration file looks like plain text (indeed, that is the intent), it is actually ruby code. That means you get everything that Ruby offers: variables, comments, file i/o (if you really want)... Suprails just provides a vocabulary to perform somewhat complicated things in a concise manner.

    Also, I'm working on a homepage for suprails, where rails devs can share their own configuration files and home-brewed facets (ie: plugins) for suprails. I'm still working on the user-submission functionality but the basic site is here: http://suprails.org

  2. #2
    Geoffrey Grosenbach Says:

    I love the concept, but wouldn't a shell script, Rake task, or Sake task be simple, easier, and use proven/implemented libraries?

    I use a sake task to install all my plugins in new Rails apps, run generators, initialize it as a git repository, etc. It works great, uses Ruby syntax, and doesn't look much different from the configuration files mentioned at suprails and rg.

    Or is there an added benefit of these projects that I'm missing?

    Also, I'd like to see it pronounced "super ales!"

  3. #3
    Bradley Grzesiak Says:

    It's good to hear your input, Geoffrey. I guess the biggest reason to use suprails is the as-yet-underdeveloped website that goes along with it. With suprails, you have a very concise and easy-to-grok configuration file that runs inside ruby. With that in mind, a website that aggregates and possibly ranks a multitude of such config files would be of great use to someone like me... who is fairly new to the rails scene and is completely unfamiliar with many of the available plugins (eg: I can infer what Sake is... but have personally never heard of it). With suprails.org, I can instantly see stats on what the pros are using.

Leave a Reply