Thomas Mullaly

DevOps, Security and IT Leadership

Rails Deployment Using Capistrano

Create your new rails project

rails new myapp
cd myapp

Get git initialized

git init

Edit your .gitignore file to include some more options

vi .gitignore

Add this:

# Added from

Now add the files to git and commit

git add .
git commit -a -m 'initial commit'

Edit your Gemfile and uncomment capistrano then run:

bundle install

Now we’re gonna “capify” the application, run:

capify .

You should see this output:

[add] writing './Capfile'
[add] writing './config/deploy.rb'
[done] capified!

Capistrano logs into your production servers and checks out the latest version of your production branch, we need to get our app onto a scm server that the production server has access to. I’m going to use as the example, but it could be anywhere.

git remote add origin
git push origin master