Hi.
Stamped steel rail nuts (obviously) have a tighter securing gap in the lips than those intended to be used in extruded rails. Both are somewhat interchangeable, but won't work well in the long run.
Gluing a nut into the rack will spell disaster sooner or later, but if You try, buy a 20" or so T-handle socket wrench for the nut beforehand

.
You do have rectangular holes in the rails, right?
If they're not, they're either pre-threaded like
Bongomania suggested, or if there's no thread, the proper "nut" is a stamped steel fastener that is a thin strip of steel folded in half, usually with punched "threads" rather than a welded nut. The kind that the car interior panels and fenders was mounted back in the day.
A pic would help, or the brand and model of the rack.
Regards
Sam