ensure Rails is defined before checking version