updated checks of environment with Rails.env by Rails.env methods