Bummer! This is just a preview. You need to be signed in with a Pro account to view the entire video.
Start a free Basic trial
to watch this video
Learn about Capistrano and how it can help you deploy your app to servers automatically.
-
0:00
[SOUND] In previous workshops we manually deployed
-
0:04
our Rails app to a production environment.
-
0:09
We cloned Git repo with our Rails app to a server, created the database,
-
0:13
set up configuration for Nginx in Unicorn, and more.
-
0:16
For every additional server we set up, we're going to need to repeat those steps.
-
0:20
And every time we release a new app version,
-
0:22
we'll need to pull changes from Git and restart our server.
-
0:26
If we do all this manually, over time the potential for mistakes adds up.
-
0:30
So, in this course, we're going to show you how to do all this automatically
-
0:33
using the Rails community's most popular deployment framework, Capistrano.
-
0:37
Capistrano can make your deployments fast, easy, and safe.
-
0:41
This guide covers Capistrano 3 which was released in 2013.
-
0:45
It has several incompatibilities with Capistrano 2 and earlier.
-
0:49
So, when you're searching the web for troubleshooting tips you should double
-
0:53
check any source written before 2013, as the info may be outdated.
-
0:56
Also, be aware that Capistrano scripts often have to be highly customized for
-
1:00
the environment they're deploying to.
-
1:02
We're deploying to a completely fresh Ubuntu server using RPM, PostgreSQL,
-
1:07
and Nginx.
-
1:09
If you are set up different from this in any way, you're almost certainly
-
1:12
going to have to make some changes to the Capistrano code shown here.
-
1:15
Be sure to check the teacher's notes for troubleshooting help and
-
1:18
try pasting any error messages you get into a search engine.
-
1:21
Today, we'll be giving you an introduction to Capistrano.
-
1:24
But in the end,
-
1:24
you'll have a little bit of work to do in order to get it going with your setup.
-
1:28
Okay, ready?
-
1:29
Let's take Capistrano for a spin.
You need to sign up for Treehouse in order to download course files.
Sign up