Rails3 compatibility: replace RAILS_ROOT with Rails.root

fix more syntax error of #253.