Fixed bug where production would always be used as the environment for rails.