Merb & Rails



Looks like Merb and Rails are combining forces voltron style. I think this is for the best, I was actually in the process of learning and building out a Merb app; I still will. I was reading the specs and documentation on Merb and was thinking “Man, Rails should have been like this!”. Well now it is going too with Rails 3.

Making a Remote Git Repo on Media Temple (DV)


I’ll be using ssh and rsa certs.

ssh into your server using root.

Add a user on the server

Now you should have a /home/git directory
Inside that directory we will make a new repo and cd into it:

You now have a remote git repository. To create new repos just follow these steps without the adduser, unless you want to create users for each different repos. You might want to look into gitosis

Now generating ssh keys to connect the server and client instead of using a password.

This should create on your client computer a .ssh directory and to files: id_rsa and important to us. Mac location is “/User/[username]/.ssh”, Linux location is “/home/[username]/.ssh.
cd into that directory then:

this is your public key that needs to be copied into your servers .

Paste the public key into this file and save. Since I use a Mac I had to duplicate [copy] that file into authorized_keys2.


My First Merb App Part II – Connect to a DB


Looks like SQLite3 is the preferred database for everything Ruby now.

I had to do this:


My First Merb App Part I – Setup


My first app ofcourse has to be:

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.

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


Installing Merb on OSX 10.5


also had to do this for my system