Skip to content

AddingACapistranoTask

Noah Gibbs edited this page Mar 11, 2015 · 1 revision

Adding a Capistrano Task

It's pretty easy to find blog posts and online tutorials for how to add a Capistrano task for various things. Capistrano is also strongly based on Rake, which can make it easier.

In general, you'll want to add your tasks to config/deploy.rb so they're available in all environments. You can also include other task files, which can be a very clean way to handle it.

In general, MadScience doesn't do much special with Capistrano except parse your JSON file for configuration variables, so Capistrano mostly works without modification.

Capistrano Versions

Older Capistrano tasks and tutorials are for version 2 instead of version 3. They can take some work to update.

If you Google the variable name that's giving an error, there are often more blog posts telling you how to change it.

The best, of course, is to find documentation that's current for Capistrano 3, which gets easier every day. Consider contacting the author of the blog post to see if there's an updated version.

Clone this wiki locally