It's due to the fact that IV/smoked cocaine floods the brain with dopamine. Now dopamine in the right place (eg. nucleus accumbens), is what makes it feel like 1000 orgasms (what I've been told, as I don't like coke. It turns me into an unbelievably irritating, full of shit arsehole, so I just avoid it). Unfortunately, dopamine in the CTZ (chemoreceptor trigger zone), gets you puking like it's going out of style (also why ipecac/emetine & apomorphine make for the big spit). Opioids cause puking by the exact same mechanism, as do dopaminergic stimulants (felt nauseous with meth, but never puked).
To stop the pukefest, you need chemotherapy strength antinauseants. Avoid prochlorperazine, as it does stop you puking, but still leaves you with endless dry heaves. So, best bet is a cannabinoid, either synthetic (nabilone), or nature's finest (THC). Ginger might help some, but it's not really a dead cert.