The best way to relieve gas pain is to let it out. The less gas in the body system, the less pain you will feel. Further, avoid foods that can cause trapped gas in the ribs. Try taking apple cider vinegar in the water and do some exercise.