check that rails is defined.