We all used to believe this. But now we know: no food will cause an ulcer.
Ulcers are not caused by stress, either, although if you are stressed you may secrete more stomach acid, which can aggravate an ulcer.
The main cause of stomach ulcers is actually a bacteria called Heliobactor pylori. Excessive use of non-steroidal anti-inflammatory drugs or over-production of stomach acid (from other health problems) can also cause ulcers in some instances.
The bottom line: Myth
If you like spicy food, enjoy, and rest easy that it's not going to cause a nasty ulcer some day.