-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Example? #1
Comments
Hey, Sorry to hear you're having troubles. Sure, I can do that when I get behind a computer, but till then, have far did you get to? |
I copied this require "capistrano/setup"
require "capistrano/deploy"
require "capistrano/rsync"
set :application, "foo"
set :stage, :production
set :deploy_to, "/var/www/foo"
set :repo_url, "."
role :app, "user@foo"
set :rsync_options, %w[--recursive --delete --delete-excluded --exclude .git*] |
Hi @moll , I have read the documentation but still can not get to work too On my Capfile # Load DSL and Setup Up Stages
require 'capistrano/setup'
# Includes default deployment tasks
require 'capistrano/deploy'
require 'capistrano/rsync'
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r } On my deploy.rb: set :application, 'IRMAP'
set :scm, :rsync
set :rsync_options, %w[--recursive --delete --delete-excluded --exclude .git*]
set :deploy_to, '/home/campus/rubyHome/apps/IRMAP'
namespace :deploy do
desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
# Your restart mechanism here, for example:
execute :touch, release_path.join('tmp/restart.txt')
end
end
after :restart, :clear_cache do
on roles(:web), in: :groups, limit: 3, wait: 10 do
# Here we can do anything such as:
within release_path do
execute :rake, 'cache:clear'
end
end
end
after :finishing, 'deploy:cleanup'
end it makes a tmp/deploy git clone at local machine but seems that doesn't do a rsync from this tmp/deploy to /home/campus/rubyHome/apps/IRMAP/shared/deploy in remote mechine.... any suggestion? |
I might have a feeling it's related to the |
Thanks @moll If I put :git on :scm line, when I do a cap deploy, Capistrano tries to make a git clone on server side, that's what I want to avoid (I haven't git on server). |
@moll thanks for your example. Have not tried it yet. But i had the same problem as @rromerogar ... |
If I set :scm to git, then execute: cap test rsync , It's make shared/deploy on remote server. Then, change :scm to rsync, and then execute cap test deploy, and...works... 😑 |
Thanks for the feedback, fellows, and sorry for the troubles! I'll take a deeper look at everything tonight. |
@rromerogar Please look at my pull request and try it out ... |
I had the same Problems. The pull request ist working for me, please merge into master! |
Is this gem working for anyone?
|
@estahn it didn't work for me without some changes. The following Capfile seems to be the minimum config (note, for testing purposes I only have this Capfile and be sure to clean out the tmp/ directory while debugging):
Regarding the set_current_revision: this seems to be needed now, but I didn't manage to make a working implementation that populates it properly. See Capistrano's git.rake if you want to try this. |
Resolving issue with set_current_revision not declared
Personally I can't get a rails application to deploy fully. Firstly, the script does not create a shared/config/deploy on the target machine and fails, so I had to create it manually. Secondly, rsync does not copy over many folders and directories, including /app, the Gemfile, etc. It only copies /vendor and some other stuff. I have no idea why it just does not copy the entire cached repo... |
It appears this gem is not being updated anymore and that a handful of people trying to use it are unable to get it to work. I browsed through the forks and found this one https://github.com/nifty/capistrano-rsync to be comprehensive and is better integrated with Capistrano 3. I thought I would share here in case people are banging their heads trying to get things working. Hope this helps. |
capistrano 3.4.0の変更に追随
Thanks all, i use https://github.com/Bladrak/capistrano-rsync these days. |
I have read the documentation but still can not get to work? Can you create a sample configuration?
Thanks!
The text was updated successfully, but these errors were encountered: