Gex is a commune in the Ain department in eastern France and a subprefecture of the department. It lies 5 km from the Swiss border a…Gex is a commune in the Ain department in eastern France and a subprefecture of the department. It lies 5 km from the Swiss border and 16 km from Geneva. It is a subprefecture of Ain.