makes sure rails is defined