Thanks for writing your query
After going through your suffering, the pain could be of costochondritis
(painful when ribs are pressed), may be relieved by following measure along with the drugs like ibuprofen-
1. Avoiding unnecessary exercise or activities that make the symptoms worse; avoid contact sports until there is improvement in symptoms, and then return to normal activities only as tolerated.
2. Rib belt along with hot water fomentation helps.
If the problem persists you may see a doctor to rule out the other possibilities.
Hope this information suffices and I shall be glad to answer any further query.
Take care and wish you good health