Enable passanger on control panel. Assume your public folder is depot.xiaopeng.me/public [bash] # git checkout your rails project $ git clone file:///home/pxiao/git-repos/depot.git $ rm -rf depot.xiaopeng.me $ mv depot depot.xiaopeng.me $ RAILS_ENV=production rake db:migrate $ mkdir tmp $ touch tmp/restart.txt [/bash]