Some funny comments on here (maybe the OP's gall bladder has regenerated itself 😆 ) from people who are quite obviously NOT doctors.
If you call NHS Direct you will probably get an ambulance asap as they will make the jump from rib/abdo tenderness to chest pain which will require an 8 minute response.
I am not a doctor and I don't think one would even attempt a diagnosis on something this general without a full history, prod about and maybe further scans/tests.
I'd agree with TJ re A&E – it really depends how severe the pain is and how you feel + the fact you say it is the same as experienced before with ulcers.
Hopefully the ranitidine will ease the symptoms which may give your GP or other whoever you go to see a further clue.