You see the question correctly.
Put your passwords and keys in some yml file excluded from version control.
Then, on your production server, create the same file and add a symbolic application to it each time you deploy.
EDIT.
Capistrano is almost ready to meet these needs:
source share