Rib cage in pain after eating

Occasionally I will get rib pain in middle of night then couple hours will pass in moderate pain.

Today was worse ever.I feel like it was even worse after eating.I feel like someone was holding and crushing my ribs and it was so painful omg.I took hot shower,take pain killers,tea,cried,and on the end TMI I had to vomit.After that was better still in pain but much less.

Now this doesn’t happened every time I eat just once in a while def will mention to my doctor but did anyone had this problem ever

*English is my second language so sorry for misspelling and grammar errors*