开发者

Why does Capistrano 2 refuse to cap deploy:cold after cap deploy:setup was successfull?

开发者 https://www.devze.com 2023-02-01 12:39 出处:网络
I am trying to deploy a Rails3 app with Capistrano (2.5.19). I have successfully run: cap deploy:setup

I am trying to deploy a Rails3 app with Capistrano (2.5.19). I have successfully run:

cap deploy:setup

and the correct directories were created on the server. But when I run cap deploy:cold or cap deploy the script hangs halfway through.

    shell$ cap deploy:cold
  * executing `deploy:cold'
  * executing `deploy:update'
 ** transaction: start
  * executing `deploy:update_code'
    executing locally: "git ls-开发者_StackOverflow中文版remote git@server.foo.com:test.git master"
  * executing "git clone -q git@server.foo.com:test.git /home/deployer/www/apps/test/releases/20101223162936 && cd /home/deployer/www/apps/test/releases/20101223162936 && git checkout -q -b deploy be3165b74d52540742873c125fb85d04e1ee3063 && git submodule -q init && git submodule -q sync && git submodule -q update && (echo be3165b74d52540742873c125fb85d04e1ee3063 > /home/deployer/www/apps/test/releases/20101223162936/REVISION)"
    servers: ["server.foo.com"]
    [server.foo.com] executing command

Here is my deploy.rb:

$:.unshift(File.expand_path("~/.rvm/lib"))
    require 'rvm/capistrano'
    set :rvm_ruby_string, 'jruby'

    # main details
    set :application, "test_sqlserver"
    role :web, "server.foo.com"
    role :app, "server.foo.com"
    role :db,  "server.foo.com", :primary => true

    # server details
    default_run_options[:pty] = true
    ssh_options[:forward_agent] = true
    set :deploy_to, "/home/deployer/www/apps/#{application}"
    set :deploy_via, :checkout
    set :user, :deployer
    set :use_sudo, false

    # repo details
    set :scm, :git
    set :repository, "git@server.foo.com:test.git"
    set :branch, "master"
    set :git_enable_submodules, 1

I believe my file permissions are setup correctly


There appears to be a bug in JRuby since at least 1.6.5 -- see SSH Agent forwarding does not work with jRuby (which lets capistrano ssh-deployments fail)

Apparently one "workaround" is to not use SSH agent forwarding, though that may not be acceptable. If you want the issue noticed and fixed faster (I know I do), watching the issue might help.


Looks like you can't run Capistrano under jruby, as jruby-openssl doesn't support Net:SSH which underlies Capistrano.

http://jruby-extras.rubyforge.org/jruby-openssl/

0

精彩评论

暂无评论...
验证码 换一张
取 消