Charges have been laid after police got a tip about a man riding a bike down the CP Rail tracks in Chatham, carrying a gun.
Officers found the man on the tracks near Richmond Street, but say he took off into the bush and later emerged empty handed.
A pellet gun was found nearby, and authorities say the bike had been reported stolen.
Police say the accused was already under a court order not to have any firearms or weapons.
The 39-year-old is now facing charges of possession of a weapon for a dangerous purpose, possession of stolen property, and also charged under the Railway Safety Act for entering land on which a line work is situated.