Archive for the 'Merb' Category

:template not found in merb-core 0.9.1

In merb-core 0.9.1 render :template works in a slightly unexpected way. When using the :template option the :format is ignored in finding the correct template.

render :template => "/upload/form", :format => :html

The above will match the templates approot/app/views/upload/form.{erb,haml}

The quick fix for this is to put the format in the :template string…

render :template => "/upload/form.html"

Which will match approot/app/views/upload/form.html.{erb,haml}

Take a look yourself in merb-core 0.9.1 render.rb#278

March 13 2008 | Merb | 2 Comments »

Get Merb, Wear Merb, Fly

Merb is in pretty much constant development at the moment, building up to the big 1.0 release. I’m not going into production immediately but plan to come the next major release, so quite happy to run out of the repository.

Below is a no frills guide to getting up and running with merb.

First off, you’ll need git installed. If you’re on OSX Leopard then try this post here.

Right, lets grab all the repos we need.. and install them..

$ git clone git://github.com/wycats/merb-core.git
$ git clone git://github.com/wycats/merb-more.git
$ git clone git://github.com/wycats/merb-plugins.git
$ cd merb-core ; rake install ; cd ..
$ cd merb-more ; rake install ; cd ..
$ cd merb-plugins ; rake install ; cd ..

You can now create a new merb app with..

$ merb-gen myapp

If you’d like to use activerecord make sure you have the latest version, uncomment the use_orm line in your approot/config/init.rb and add a approot/config/database.yml.

March 12 2008 | Merb | No Comments »