Skip to content
mengfung.com
writing

My First Merb App Part I – Setup

 ·  1 min read

My first app ofcourse has to be:

merb-gen app hello_world
merb

outputs are familar, similar to Rails. http://localhost:4000 to get the Merb default app screen.

Pretty straight forward so far.  Now to actually have it do something worth while.

Next thing to do is make a controller, I ran Merb-gen just to see what was available.

merb-gen controller HelloWorld

tada! http://localhost:4000/HelloWorld/index or http://localhost:4000/hello_world/index now works.

Looking at the file controller/hello_world.rb you get

class HelloWord < Application
def index
render
end
end