Amass

Using Capistrano to deploy Rails apps without Source Control

Someone I take very seriously does a lot of Ruby on Rails work - and as a result of that, I figured that I should at least take a look at the framework.

Over the weekend, I whipped up a quick little app, without using source control - it’s a quick project, and I’m not really concerned if it suddenly vanishes into the ether.

However, when it finally came time to deploy it, there was a bit of a hiccup: Capistrano’s deployment process usually involves some sort of source control - whether that’s Subversion, CVS, Darcs, or something different entirely(like Git).

Luckily however, getting Capistrano to deploy your app when it’s not under source control is a matter of only 3 lines of code, inside deploy.rb:

set :repository, "."
set :scm, :none
set :deploy_via, :copy

Once you’ve made those changes, all you need to do is run your deployment commands from within your project’s directory - and Capistrano will copy all the files over for you, without requiring you to have them under source control.

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image