Capistrano and Git Deploy Rails App -


when trying deploy rails app production server capistrano, doesn't seem recognize project being git repo, despite me having cloned project directly github.

the git log:

$ git status on branch master branch up-to-date 'origin/master'. nothing commit, working directory clean 

cap log:

$ cap production deploy      triggering load callbacks   * 2016-06-01 16:30:26 executing `production'     triggering start callbacks `deploy'   * 2016-06-01 16:30:26 executing `multistage:ensure'   * 2016-06-01 16:30:26 executing `deploy'   * 2016-06-01 16:30:26 executing `deploy:update'  ** transaction: start   * 2016-06-01 16:30:26 executing `deploy:update_code'     executing locally: "git ls-remote git@github.com:mitigation/mpm.git r1"     command finished in 662ms   * refreshing local cache revision 8c86d067abde1464f88902566324a99e22cd3147 @ /var/folders/xs/5qz1glwj30v51rwpxhyclw880000gn/t/mpm     executing locally: cd /var/folders/xs/5qz1glwj30v51rwpxhyclw880000gn/t/mpm && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard 8c86d067abde1464f88902566324a99e22cd3147 && git clean -q -d -x -f  fatal: not git repository (or of parent directories): .git  command finished in 13ms shell command failed return code pid 52560 exit 128 

here's capfile:

load 'deploy' load 'deploy/assets' load 'config/deploy'  

here's deploy.rb:

require 'soprano'  require 'bundler/capistrano'  require 'capistrano/ext/multistage'  require 'whenever/capistrano'  require 'leipreachan/capistrano2'  set :default_environment, {   'path' => '/home/deploy/.rbenv/shims:/home/deploy/.rbenv/bin:$path' }   set :web_server, :nginx set :keep_releases, 3  set :repository, 'git@github.com:mitigation/mpm.git'  set :deploy_via, :copy set :copy_exclude, %w(.git .idea .yardoc tmp log .ds_store doc/* public/uploads.tar db/*.sql vendor/cache) set :copy_cache, true  set :bundle_without, [:development, :test] set :bundle_flags, '--deployment --binstubs'  set :user, 'deploy'  before 'deploy:setup', :db after 'deploy:create_symlink', 'utils:version' after 'deploy:update_code', 'db:symlink'  #for troubleshooting namespace :deploy   task :update_code, :except => { :no_release => true }     #on_rollback { run "rm -rf #{release_path}; true" }     strategy.deploy!     finalize_update   end end 

during deploys various environments, capistrano3 creates directory tree , puts git information in folder called repo_path. you'd have travel inside directory on production server , "$git log" work indicated .git repo

you shouldn't need .git in copy_exclude.

try running through capistrano3 set process on again app different environments.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo