Cayenne is a great substitute for ginger. Both are primarily used for the heating abilities. Cinnamon is another suitable substitute, depending on the work. Rosemary doesn't share the heating properties of ginger, so depending on the role ginger played in your work, I would reccomend against it.
(Opinion colored by practice)