Namespace accessing Rails.env

Fixes bug introduced in 8600986e635c1b102b66700e0b211ed7a4400d38