Refs #7423: Require rails before checking for Foreman lib directory.