As above by @78pmooney, if you ride enough you can eat enough that that you'll get all the vitamins, protein, carbs, fat, etc. that your body needs from real food. That's so true. For most of us, wimpy <100 miles/week riders, some supplements are handy. I use Twinlab Daily One caps. I also take a sublingual B12 complex and 2000IU D3.
But also as said previously, nothing's going to take the sting out of long rides except doing them. Even that won't fix it when you go longer than usual. Pain is good for you. It means you're doing the right thing. I had a strenuous ride yesterday and my legs are hurting as I type this. If they weren't, I'd know I hadn't done enough.
Good point about the coffee. It's real effect is to improve fat burning, which will reduce lactate production to some extent.
__________________
Results matter