Change RAILS_ENV at the last second