Massive ly. They both need to live in pairs or groups and are social. Gerbils need a minimum cage size of 100x50cm for every pair DO NOT get a plastic cage as they can chew throu gh it. They need a tank, like the ikea detolf, with a minimum of 10" of bedding. PicklesPets a youtuber have good videos on them. They need tons to chew on and are active during the day and night, but spend most their time burrowing.
Rats need a cage at least 200cm long, and 200cm high per pair. The double critternation can house 8 rats. They chew a lot and are highly active. Their entire cage has got to be filled with toys from top to bottom as they are very intelligent and can become depressed if not entertained, or if alone. There's lots of research to be done about both species but do not listen to pet shops, having experienced this, the employees are told to sell the smallest cages and smallest wheels because it makes them money. 90% of what they say is not true, but they have to so the shop makes the most money. They do this with eve ry animal species. Emiology the youtuber has rat videos that can be useful