Dr Nic

Merb 0.4 – Installing Edge Merb and using new Generators

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.”


Installing Edge Merb and using new Generators from probablycorey on Vimeo.

Alternately, download the 800×600 QuickTime version (22Mb).

Errata:

  1. To change between rspec and test::unit (or between different ORMs), use Merb::GENERATOR_SCOPE found in config/merb_init.rb, rather than hack script/generate as I do in the video :)
  2. 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).

Related posts:

  1. TextMate bundles for Merb If you are using TextMate (OS X) or E Text...
  2. One-stop JavaScript Unit Testing for Rails 2.0 Previously, I mentioned a multi-step/multi-project solution to doing JavaScript Unit...
  3. NewGem Generator – now with script/generate The New Gem Generator (0.13.0)’s newgem command now behaves like...

6 Responses to “Merb 0.4 – Installing Edge Merb and using new Generators”

  1. Corey says:

    Hey, I put your video on vimeo.com, it is a little easier to read and you could embed it instead of the youtube vid. http://vimeo.com/372998

  2. Dr Nic says:

    @Corey [via] – cool, ok, giving it a try above.

  3. scott says:

    I’m a merb neophyte, but after only a couple of days investigating what its about I think I’m hooked!

    It looks like the errata above might be already outdated :-)

    It think the Merb::GENERATOR_SCOPE is now replaced with use_orm [:active_record, :data_mapper], use_test [:test_unit, :rspec]

  4. Dr Nic says:

    @scott [via] – yeah, my video will be completely redundant. Merb 0.4 is out now, so no need to get trunk, etc :)

  5. Dr Nic says:

    @jamiew [via] – thx, fixed.