Rememer that the weight that you might be gaining is water weight that will get peed and sweated out. Also, when weighing yourself, you need to do it the same time of the day. If you weigh yourself at 11 am before a bike ride compared to 3pm afterward, there's bound to be a difference. Also, if your weighing yourself after you drink without peeing, the water is still there.
Based on that, if it gets hot, drink, drink, drink!!! And don't drink a lot at once, just enough to satisfy. Make sure that your getting the proper nutrients while riding and the correct quantities for distance. I don't drink the same amount of water on 15 mile ride than a 30 mile ride.
Also, make sure that your eating right too, both before, during, and after riding. Fruit contains a lot of water and nutrients, so I try to have some fruit before and after riding. This could also be affecting weight and hydration.
Hope this helps and stay hydrated!