Change deprecated RAILS_ROOT and RAILS_ENV to Rails.root and Rails.env