replace missing 'RAILS_ROOT' variable with 'Rails.root'