The eraser trick was from the days of edge connectors on old carts and cards, where the pins actually got oxidized and a pencil eraser would scrub the crud off. RAM sticks don't have that problem, the contacts are gold plated and the real issue is usually dust or not being seated all the way. Erasers leave behind a residue and can rub off the thin gold layer over time, which is worse than the problem you were trying to fix. Give the slots a shot of contact cleaner and reseat them firmly, that solves most of it.