Hey Juan, I would probably just SSH in and run those commands on the server in the app's current directory. You probably could run Capistrano tasks to do that, but SSH is probably easier.
That was the first approach I tried but using 'deploy' user I don't have enough privileges, and if I switch to 'postgres' user I can't run bundle exec. How do you do that? Thanks