remove mode and used Rails.env...