What dose of Ranitidine do you take? Some of the versions on sale are only 75 mg which may not do much. I have a hiatus hernia and take Ranitidine - 150 mg, as I need it. I also take one of the "prazoles" (ppi's - omeprazole, pantoprazole etc) now and then, especially if I know I'll be going out and less in control of what I eat and drink. I also always carry Rennies with me - in pocket of every coat, handbag, by the bed!
Ranitidine has a much shorter effect than Omeprazole - less than 12 hours, but my experience is that it starts working faster, usually after about 1/2 hour. As far as I know, it's ok to take 150 mg every 12 hours. It has fewer side effects than Omeprazole. Long term use of ppi's is now known to have various risks, which is why you may have been taken off it, but using now and then is OK.
I often take a ranitidine shortly after a meal and before I do something like gardening, which will involve bending down - very bad for someone with hiatus hernia! I also avoid eating late, or big meals. I do supplement with Rennies, as needed, but since they are a source of calcium I reckon they're probably good for bones!