You can use this strategy to deploy your Rails app properly when it's located in a subfolder in the main repo.
Supports Capistrano 3.x (tested on 3.2.1).
-
Place this file in
lib/capistrano/git_subfolder_strategy.rb
-
Add this line to your
Capfile
:require_relative 'lib/capistrano/git_subfolder_strategy'
-
In your
deploy.rb
, set the following:set :git_strategy, Capistrano::GitSubfolderStrategy set :git_subfolder, '/subfolder/to/deploy/from'