Akash Xavier RSS


About

Everything interesting that I come across in my life, I post it here.

Social
Dec
7th
Sun
permalink

Getting started with Merb and Haml

Merb and Haml can be installed from gem.

gem install merb
gem install haml

(As of this article the latest version of Merb is 1.0.3)

Note: All commands are alike for both windows and linux environments unless mentioned

Unlike Rails, there is nothing else to be configured to get Haml working with Merb. All views ending with .html and .haml files are automatically handled by Haml.

To generate your first merb app, just cd to the directory where you want the app to reside and then use merb-gen

merb-gen app myapp

This creates a directory ‘myapp’ under the current directory and generates some merb files in the directory. Now cd to the ‘myapp’ directory and checkout the file structure.

Observe the config/database.yml file. The database being used is sqlite3.