If the cause of your gastritis is Helicobacter pylori you will need to take a few other medications too. They should have tested for this during an endoscopy or other test.
You need to eat a blander diet during your healing time and maybe add an antacid.. mylanta, zantac, pepcid and a few others that I cannot remember the names of are examples. Avoid whatever foods (foods with high acid and spicy are usually culprits) and drink (again high acid contents like coffee (dark roast coffee has less acid if it is a must for you), tea (some herbal teas do not have as much acid) and sodas that make your symptoms worse.
Avoid alcoholic beverages and sodas. Do not take NSAIDS.. like aspirin, ibuprofen, aleve, etc.