0

在升级到 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 upload(在我的原始脚本中,我使用 ':via => :scp')

4

1 回答 1

0

当我发现问题出在我的 Rubinius 安装时,我也在为同样的问题苦苦挣扎。更改为当前的 MRI 为我解决了这个问题。亲切的问候

于 2014-06-30T08:35:40.407 回答