What's the meaning of きみは年をとって死ぬまで、ろくなめにあわないのだ ?
I'm trying to understand the meaning of this sentence: I could get, more or less, the part before the comma but after that everything is dark. ろくな should be "not good" but what are those め and に after it? and what does わないのだ mean?