I rarely get the opportunity to ride more than 2hrs at a time, so don't take solid food with me - but do follow the one bottle of water + one bottle of sugar-stuff (gatorade etc.) routine, since I'm always riding hills. Surprised no-one else has asked you what kind of terrain you'll be covering for your 30-40mile ride.