Home / Companies / Semaphore / Blog / Post Details
Content Deep Dive

Capistrano 3 Upgrade Guide

Blog post from Semaphore

Post Details
Company
Date Published
Author
Darko Fabijan
Word Count
1,139
Language
English
Hacker News Points
-
Summary

Upgrading from Capistrano 2 to Capistrano 3 involves several key changes that streamline deployment processes and improve code cleanliness, although it requires some adjustments due to changes in syntax and configuration. Capistrano 3 now includes built-in support for multistage configurations, making the capistrano-ext gem unnecessary, and it is framework agnostic, requiring the capistrano-rails gem for Rails applications. The new version requires manually moving old configuration files to a new setup, updating the Gemfile, and modifying deployment files to align with Capistrano 3's updated syntax and features. Notably, the handling of deployments has evolved, with the introduction of local repository mirrors and an updated approach to environment variables and branch settings. The main configuration file, config/deploy.rb, has undergone significant changes, such as the removal of deploy_via and the automatic handling of symlinks. Despite these improvements, certain libraries like whenever and bugsnag lack native support for Capistrano 3, necessitating additional manual adjustments by users. Overall, the upgrade results in a more efficient deployment framework, especially with the integration of SSHKit, although users must adapt to the new practices and potentially contribute to open-source documentation to fill in the gaps.