Automatic detection of rail track and its fasteners via using continuously collected railway images is important to maintenance as it can significantly improve maintenance efficiency and better ensure system safety. Dominant computer vision-based detection models typically rely on convolutional neural networks that utilize local image features and cumbersome prior settings to generate candidate boxes. In this paper, we propose a deep convolutional transformer network based method to detect multi-class rail components including the rail, clip, and bolt. We effectively synergize advantages of the convolutional structure on extracting latent features from raw images as well as advantages of transformers on selectively determining valuable latent features to achieve an efficient and accurate performance on rail component detections. Our proposed method simplifies the detection pipeline by eliminating the need of prior settings, such as anchor box, aspect ratio, default coordinates, and post-processing, such as the threshold for non-maximum suppression; as well as allows users to trade off the quality and complexity of the detector with limited training data. Results of a comprehensive computational study show that our proposed method outperforms a set of existing state-of-art approaches with large margins