The 30 mile ride, hands down.
The spin class has warm up and warm down, so you probably only have 40 minutes or so of aerobic activity, while a 30 mile ride probably has at least 90 minutes of aerobic activity.
I also think that it requires your body to dip into its reserves, as it were, and the promotes burning of stored fat.