Replace constant RAILS_ENV by Rails.env