Vomited right after taking prednisone and doxycycline?

I ate breakfast and took prednisone and doxycycline for the first time for pneumonia and not even 10 minutes after I took them I got so nauseous I vomited. I’m pretty sure I vomited up all the meds too. How can I prevent this from happening again?