Not sure about `RAILS_ENV`, but `Rails.env` should always be set.