Have you been doing anything to stretch your rib cage lately?
Do you have other health problems?
What is your age?
Did you have a recent cough or illness?
Have you been to a medical doctor?
Did you have xrays of your ribs?
Taking ibuprofen for very long can irritate you stomach and gastritis.
Try tylenol and see if that can work for you instead.
We will know more after you have your xrays done.
Your doctor ( when you find one) may need to put you on a RX medicine for your stomach to heal it up.