What can cause like muscle spasams/crampy below right ribs?

Any number of. Things can cause this. Possibilities: gallstones, shingles, muscle injury, constipation, colitis, kidney stones or infection, or rarely even cancer. Consult with a doctor.