Use correct rails env retrieval (copy pasta)