The treatment for throwing up bile depends on what's causing it. If you have food poisoning or you've been binge drinking, you may need to get intravenous fluids and electrolytes in the hospital. If you have bile reflux, your doctor might start by prescribing one of these medications: Ursodeoxycholic acid.