December 2nd, 2008
Update: Pratik covers rails templates in more detail here.
I hate to use uber-superlatives, but this is just plain frakkin awesome to the power of a Chuck Norris roundhouse-kick: Jeremy McAnally’s rg (don’t worry if you have no clue about rg - I heard about it 10 minutes ago myself (via Pratik)) made it to the rails core.
So what the hell is rg to begin with? rg is a rails generator, like the ‘rails’ command (the one used to create a blank Rails app) just way cooler. You think it has never been easier to create a skeleton app because we have bort? Well, then check this out:
(Eyes glazing over? Check it out (as well as other examples) on github).
It’s hard to believe, but the above template is able to generate a clean rails app which is basically bort (Or exactly bort. Or very similar to bort. Or similar to a bort lookalike. Or… I guess I leave this debate up to ruby lawyers, bort experts, rg zealots etc.) Anyway, it doesn’t really matter as rg was not invented to compete with bort - bort is merely used as an example because it’s probably the most popular Rails skeleton app nowadays - rg is far more general than that: an easy, concise, Rubyish way to describe your Rails app (including plugins, vendored gems, lib files, initializers and whatnot) in a very straightforward way.
There are a handful of base Rails apps out there - but the chance that one of them is exactly using the tools you are committed to is minimal. For example I prefer HAML to erb, SASS to CSS, jQuery to Prototype, somewhat undecided between Shoulda and rSpec, I’d like to give authlogic a spin the next time I need user authentication etc. and the list goes on and on - and it changes over time. With this addition to Rails this is no problem - it takes minutes to cook your own Rails skeleton app, and minutes to adjust it later.
If this is still not enough, check out the Jeremy’s TODO list: Save yourself the hassle of keeping your core components up to date (coming soon). OMG, I have been waiting for something like this for ages, and I doubt I am alone (though the ability to describe gems in environment.rb was a great leap forward) - this will really rock! Kudos Jeremy!

December 3rd, 2008 at 1:15 am
Woo! Great find Peter!! And thanks to Pratik too for passing it along.
December 3rd, 2008 at 1:21 am
@glenn: haha, thinking about switching back to rails?
December 3rd, 2008 at 2:13 am
That is awesome.
December 3rd, 2008 at 5:31 am
[...] Hot in Edge Rails: Generate Rails Apps from Templates - This is indeed hot, and will largely replace the need to keep static template applications hanging around. [...]
December 3rd, 2008 at 8:34 am
The next step?
framework(:foo) do
ruby ‘rubinius’, :git => …
dbengine ‘mysql’, :src => ….
orm ‘activerecord’, :src => …
controller ‘cells + apotomo”, :git =>…
view ’sass, haml’, : …
….
end
December 3rd, 2008 at 8:38 am
@cs well, that might be a bit far fetched… though who knows?
December 3rd, 2008 at 10:13 am
@cs Looks a little like Merb
December 3rd, 2008 at 11:05 am
This is pretty sweet, I think we’ll give it a whirl with our stock Facebook application builds.
Any idea on when the “keeping your core components up to date” would be complete?
December 3rd, 2008 at 1:03 pm
[...] Ruby, Rails, Web2.0 » Blog Archive » Hot in Edge Rails: Generate … [...]
December 3rd, 2008 at 2:18 pm
@MJ: No clue, just seen it on Jeremy’s TODO list (scroll to section FEAURES AND PROBLEMS). Now that it is in Rails core, I would assume as fast as possible…
December 4th, 2008 at 11:04 am
@peter: Probably not, I’ll most likely stick with merb for new apps. This (like engines becoming core) just seems like another of the check list for feature-matching merb.
aahh… how the apprentice has now become the master
December 12th, 2008 at 7:14 am
[...] Hot in Edge Rails: Generate Rails Apps from Templates [...]