That depends upon if the frame was made in the pre-rail period. The dustcover for rail guns is significantly thicker to take the stress imposed by whatevers hung on the rail. I'd check with the Performance Center and have your serial number handy.
I talked to S&W after they came out with rails and they stated that they couldn't/wouldn't mount the rail on the older frame, it wouldn't stand the load. The dustcover has to be counterbored for the rivets, which requires more metal.
If you've just gotta do it on an older frame, this leaves you with 2 choices: get a stainless rail and have it tig welded on by an expert or use a combination of screws and epoxy to install it.