Installing Ruby using RVM, Homebrew and Xcode 4.3.

My previous post on installing Ruby 1.9.2 in combination with Xcode 4.3 generated some interest. Since that writeup I did a fresh install of a Lion machine. So here is a follow up post. I think this is the better way to go.
Continue reading Installing Ruby using RVM, Homebrew and Xcode 4.3.

RVM + Ruby 1.9.2 + Xcode 4.3

Well, had a hard time today installing some gems.
I installed Xcode 4.3 yesterday ( with it’s command line tools ) and tried to build a little test app.

I wanted to load a little data into the test app so I decided to create a Sinatra app. An iOS app without some server interaction? Boring!
Continue reading RVM + Ruby 1.9.2 + Xcode 4.3

The story of compound keys

Short story: I needed a table that could visualize the relation between two other tables ( services & portfolio ). So I set up a “join table”; a table that has two columns: service_id and portfolio_id. Each column contains a foreign key ( services.id and portfolio.id ).

Now, what you normally do is add a third column “id” as primary key. But in this case it can be a recipe for ( a programmer’s ) disaster. The column id would always contain a unique value, but the combination of the two other columns service_id and portfolio_id will not be unique. And thus you could run into a situation where you have multiple rows that hold the same relation:

Continue reading The story of compound keys