Deploy Rails app with Capistrano

  1. What is Capistrano
    Capistrano is a framework written in Ruby language that provides automated deployment. Similar to Rake tasks in Ruby language, it runs on the remote servers via SSH. It can be configured on the local or remote server. It performs the task like copy the code from the remote repository (git..), asset precompilation, migrating the database, cron jobs, restarting the Rails server and many more.
  2. Why we need to deploy rail app by Capistrano
    As we deploy our latest changes on the staging/production server by taking a pull of the latest code, restarting prerequisite commands like (cron, server..). This is an old school process, but now there are multiple tool or framework are available that minimize our time. Like “cap production deploy” command makes everything instead of repeating the whole process on each deployment.
    There is some important key features of Capistrano:
  3. Manage your app code
  • Installing new gem
  • Restart sidekiq worker, system commands of the OS, Compile assets file and many more
  • On the deployment process, if some error occurs it rollback to the previous deployment

Read more:



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store