Here's what I do. Several other folks on BF have adopted this method and had good results.
I buy maltodextrin in 50# sacks from a homebrew supply house. I put the bag in a garbage can to contain the mess. I mix the malto in a big container about 7:1 by weight with chocolate flavor Optimum Nutrition whey powder, which I buy in 10# sacks online. 2 cups of this powder mix will make a drinkable substance in a 24 oz. water bottle and supply 750 calories. Or a weaker mix for shorter rides. The other bottle contains plain water. I use Endurolytes to supply electrolytes as necessary. I've been doing this for over a decade. It works and for bike food, it's cheap. Never barfed it up.
You can obviously try it with smaller quantities before going for the 50# bag.