Create your subdomain using your cpanel. For instance ‘staging’.
ssh into your account.
cd into your www directory
mv staging staging.back
now link your public directory from your new rails app to ‘staging’
ln -s /home/username/newapp/public /home/username/www/staging
make sure file and folder permissions are set staging should be 777.