Adult corns do great in 40 gal. "breeder" tank size (3' L x 18" w x 17.5" tall). Rat snakes come in many sizes, & my largest (male) yellow rat snakes (about 15 years old) are 7' long, so...it really depends what kind of rat snake you're talking about.I know glass tanks don't please everyone- you can't stack 'em & they're heavy, but they're very sturdy (not to mention that glass is 'inert' unlike plastics which, like it or not, do off-gas unhealthy stuff, & are subject to warping or melting, etc.) & the screen tops allow both ventilation & easy supplemental heating in winter.
Call me old-fashioned, if you like, but I tried & hated a couple plastic enclosures in the past. (Prolines, made of food-safe HDPE) Glass tanks aren't very hard to insulate too, if needed. And scenery can be applied first to the outside of glass, so you never see the insulation unless you want to. (some looks better than others)