step 1, make sure lpr isnt too high, they will vent air if it is.
step 2, remove the hose from the front barb of the ram. if air comes out the front of the ram, its the ram shaft o-ring. it can seem like the solenoid is leaking when instead its just the air leaking past the ram and back out the solenoid exhaust port.
step 3, if none of the above works its probably the gasket. unscrew the 2 screws from the bottom of the solenoid holding it to the cover. inspect the gasket, put a little grease on it, make sure its aligned properly since sometimes they can move out of place when they get over-pressurized.
step 4, if it still leaks, time for a new gasket. might just be old and dried up/worn out. its not uncommon if the guns been sitting for a long time. the solenoids themselves hardly ever go bad though.
http://www.paintballgateway.com/wgpauebcosom.html