Merb 0.4 will include generators (via RubiGen) to make it uber-easy for developers to create Merb apps. Here’s a HOWTO screencast (lifted from rubyconf talk) on getting the required gems from SVN, and setting up a Merb to use ActiveRecord.
The video also shows how your generated model/controllers can either have test::unit OR rspec test files generated.
As Albert Einstein said “All your base belong to us.”
Alternately, download the 800×600 QuickTime version (22Mb).
- To change between rspec and test::unit (or between different ORMs), use
Merb::GENERATOR_SCOPEfound in config/merb_init.rb, rather than hack script/generate as I do in the video
- Prior to following the video tutorial, you need to checkout the two edge gem sources:
svn co http://svn.devjavu.com/merb/trunk merb svn co http://svn.devjavu.com/merb/plugins/merb_activerecord
The videos don’t have voice overs, because if I’d done that then I’d have been completely bored when I gave my talk. As it was, I think half my talk was videos and screencasts – I felt like a TV host… it was odd. But, you’ll get the gist.
For more step-by-step instructions, see the man who helped write the Merb generators – Daniel Neighman (irc – hassox).
- TextMate bundles for Merb If you are using TextMate (OS X) or E Text...
- NewGem Generator – now with script/generate The New Gem Generator (0.13.0)’s newgem command now behaves like...