My understanding is that you lose the game as soon as the 4th cube gets placed.
Anyway, I have always played it so that you can put each cube on any of the open cards, however, I find it tactically better to place all cubes on the same card and then buying the card to clear more cubes at once.
Thanks Matias, it is definitely better tactically but also makes the game easier, so I was wondering if it would be considered cheating. :-)
The new rules (just received mine yesterday) say 5 cubes but also says 4 cubes for a bigger challenge. (There is a variant just posted about increasing prices which could definitely increase the challenge as well.)