I've never had heartburn while riding.
I find there are 2 things that cause it. In the evening I will get it after I have been laying down a while after eating. The other type, which is very preventable comes after I do something really stupid like have 5 cups of coffee with no food.
I suggest you do eat something before your morning ride. A decent sized bowl of oatmeal with some fruit in it is my favorite.