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!
Woo! Great find Peter!! And thanks to Pratik too for passing it along.
@glenn: haha, thinking about switching back to rails? 🙂
That is awesome.
Pingback: Double Shot #344 « A Fresh Cup
The next step?
framework(:foo) do
ruby ‘rubinius’, :git => …
dbengine ‘mysql’, :src => ….
orm ‘activerecord’, :src => …
controller ‘cells + apotomo”, :git =>…
view ‘sass, haml’, : …
….
end
@cs well, that might be a bit far fetched… though who knows?
@cs Looks a little like Merb 😉
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?
Pingback: Integrate Ruby and Asterisk (Call Detail Record) Using …
@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…
@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 😉
Pingback: Nome do Jogo » Blog Archive » Rails Podcast Brasil - Episódio 39
Hi that were some great info. Despite im from germany and my english isnt that neat i was able to translate everything, so i enjoy your english style, because its so well organized and easy to interpret. Go on like that!