For me, I think it is usually more convenient to rant to someone because if I write something down, I need time and space to gather my thoughts, which are not always available when I need it the most. However, when I actually write down my thoughts and feelings (usually on a word file since I do not keep a journal), I love going back to read it later. I love looking back at who I was at some point in time and see how much I have changed or how much life has made me change. In my moments of doubt in life, these are a great resource to turn to, contemplate on and find my way through my messy times.
I think I would rather rant to my husband about things or to my friend because if I write it down, it won't help me at that time. I must admit, I used to keep any problems of mine to myself but now I share it to my husband even I know he won't be able to help me. It just helps when you tell your problems to other people you trust not just anyone. It is better to talk about what you are feeling than keep it in a journal where you are the only one who reads it. But we are all different, you might be a very private person and you don't want others to know of your troubles but sometimes it is nice to tell those people you trust and I mean the ones close to you who cares not just anyone who is being nosey.
I rarely rant, but when I do it's usually to a person or my dog. I try to work out the "rant" by playing the piano instead. I generally don't find it helpful to rant, taking the attitude, "It is what it is." instead.
Honestly I prefer to do both. Some things you can't keep to yourself, whereas other things need to be private and jotted down into a diary. It also helps to jot these feelings down for memory purposes.