Also remember that the Activation Gate exists as well. Will trigger on when an entity passes through it.
Otherwise, if they are meant to be docked, just use "Wireless Rail Activation", press C on any rail type, and V onto a button or an Activation Module, and it wireless-ly links that rail to the logic button/activator.
When an entity's rail Docker passes over the linked rail, it turns on then off. If an entity remains on it, then a button will toggle on/off, but an Activator remains on for as long as there is a docker linked to the specific rail block.
The inverse (C on button, V on rail) will cause an entity to undock when triggered. Not used so much now since we have the Shootout rails and pick up rails