add dotenv-deployment gem
add

require 'capistrano/rails/assets'
 require 'capistrano/rails/migrations'
add config/database.yml .env to linked files