bundle exec rake deploy:setup
bundle exec rake deploy
bundle exec rake deploy:update_code
bundle exec rake deploy:restart_server
Assuming you'll use rbenv on remote server. Change path to gem executable files if you'll use something else.
Sourcing ~/.profile
on remote machine before command execution to load environment variables. Check StackOverflow question to understand why to do it this way (there should be a better approach).