Use RAILS_ENV instead of Rails.env if that constant isnt loaded