Check that rails is defined.