Hello,
Welcome to ehealthforum
Pain underneath the ribs is probably due to:
1)Gastritis due to excessive bloating and gas.Tums would help you if taken empty stomach.
If the pain is persistent and recurrent then there is possibility of some other causes as Peptic ulcer disease,gall bladder issues,hepatitis etc.These can be ruled out by means of USG scan and Endoscopy.
Have small frequent meals and drink lots of water.Restrict smoking and alcohol.
Avoid spicy,fatty food items.
If the problem is persistent consider visiting a Physician for evaluation.
Take care!