This Github repository contains an example of deploying Rails application with Capistrano 3 including features:
– copy config files to shared folder
– linked files and dirs
– precompile assets locally
– precompile assets only if files were changed
– restart app in Passenger
– show a maintenance page on site while the site is updating
Find it on Github: https://github.com/maxivak/deploy-rails-capistrano3. Download the files from the repository and use the tasks according to your requirements.