Capistrano 3上传挂起

时间:2014-02-03 20:13:06

标签: setup-deployment capistrano3

升级到capistrano 3并解决了很多麻烦后,有一件事我无法工作。 mij脚本中的新上传功能挂起,capistrano不会继续。我原来的Capistrano 2.x脚本部分是根据我在网上找到的例子创建的。

在我的食谱中:

  task :setup do
desc "Creates shared Config dir, uploads local config files."
on roles(:cake) do

  execute "mkdir -p #{shared_path}/Config"

  on fetch(:cake_config_files) do |cake_config_file|
    on roles(:cake) do
      execute "echo a"
      upload! "Config/#{cake_config_file}", "#{shared_path}/Config/#{cake_config_file}", :via => :scp
      execute "echo b"
    end
  end
end 

输出:

 INFO [4f52db7e] Running /usr/bin/env mkdir -p /home/user/sites/myapp/test/shared/Config on myapp.nl
DEBUG [4f52db7e] Command: mkdir -p /home/user/sites/myapp/test/shared/Config
 INFO [4f52db7e] Finished in 0.601 seconds with exit status 0 (successful).
 INFO [69fff539] Running /usr/bin/env echo a on myapp.nl
 INFO [de58c44d] Running /usr/bin/env echo a on myapp.nl
 INFO [9f635a1a] Running /usr/bin/env echo a on myapp.nl
DEBUG [69fff539] Command: echo a
DEBUG [de58c44d] Command: echo a
DEBUG [9f635a1a] Command: echo a
 INFO [69fff539] Finished in 0.058 seconds with exit status 0 (successful).
DEBUG [69fff539]    a
 INFO [69fff539] Finished in 0.058 seconds with exit status 0 (successful).
 INFO [de58c44d] Finished in 0.063 seconds with exit status 0 (successful).
DEBUG [de58c44d]    a
 INFO [de58c44d] Finished in 0.063 seconds with exit status 0 (successful).
 INFO [9f635a1a] Finished in 0.075 seconds with exit status 0 (successful).
DEBUG [9f635a1a]    a
 INFO [9f635a1a] Finished in 0.075 seconds with exit status 0 (successful).

在此之后,没有任何反应。该脚本暂停/挂起。我回应B的测试也没有做任何事情;)

注意:我尝试使用和不使用':via => :scp'作为参数og上传(在我的原始脚本中我使用':via =>:scp')

1 个答案:

答案 0 :(得分:0)

当我发现问题是我的Rubinius安装时,我正在努力解决同样的问题。 改用当前的MRI解决了它。亲切的问候