从WinXP机器运行Capistrano。从Beanstalk repo部署到Linux机箱。
在我的Mac OS X 10.6机器上,一切都与完全相同的capfile和安装细节完美配合,但我无法在Win XP机器上正常运行。
看看deploy.rb的第95和104行,因为这些似乎会导致一些问题,但无法解决任何问题。有点不知所措: - [
部署尝试的确切日志是:
C:\Documents and Settings\Owner\Desktop>cap dev deploy
* executing `dev'
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
updating the cached checkout on all servers
SVN password for capitan, please:
executing locally: "svn info --username capitan --password ****** --no-a
uth-cache https://xxx.svn.beanstalkapp.com/repo/monolithic/trunk/ --username c
apitan --password ****** --no-auth-cache -rHEAD"
C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano /recipes/depl
oy.rb:95: warning: failed to set environment variable. Ruby 1.9.3 will raise Sys
temCallError in this case.
*** [deploy:update_code] rolling back
* executing "rm -rf /home/username/deploy/releases/20110625171613; true"
servers: ["IP.IP.IP.IP"]
Enter passphrase for C:/Documents and Settings/Owner/.ssh/id_rsa:
["IP.IP.IP.IP"] executing command
command finished in 5281ms
C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano /recipes/depl
oy.rb:104:in ``': No such file or directory - svn info --username capitan --pass
word ****** --no-auth-cache https://xxx.svn.beanstalkapp.com/repo/monolith
ic/trunk/ --username capitan --password ****** --no-auth-cache -rHEAD (Errn
o::ENOENT)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/recipes/deploy.rb:104:in `block in run_locally'
from C:/Ruby192/lib/ruby/1.9.1/benchmark.rb:309:in `realtime'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/recipes/deploy.rb:103:in `run_locally'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/recipes/deploy.rb:41:in `block (3 levels) in load'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/recipes/deploy.rb:93:in `with_env'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/recipes/deploy.rb:41:in `block (2 levels) in load'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/recipes/deploy/scm/subversion.rb:56:in `query_revision'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/recipes/deploy/scm/base.rb:35:in `block in method_missing'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/recipes/deploy/scm/base.rb:63:in `local'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/recipes/deploy/scm/base.rb:35:in `method_missing'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/recipes/deploy.rb:41:in `block in load'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/variables.rb:87:in `call'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/variables.rb:87:in `block in fetch'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/variables.rb:110:in `block in protect'
from <internal:prelude>:10:in `synchronize'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/variables.rb:110:in `protect'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/variables.rb:78:in `fetch'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/variables.rb:95:in `[]'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/recipes/deploy/strategy/base.rb:82:in `revision'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/recipes/deploy/strategy/remote_cache.rb:35:in `update_repository_cache'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/recipes/deploy/strategy/remote_cache.rb:15:in `deploy!'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/recipes/deploy.rb:218:in `block (2 levels) in load'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/execution.rb:139:in `instance_eval'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/execution.rb:139:in `invoke_task_directly'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/callbacks.rb:27:in `invoke_task_directly_with_callbacks'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/execution.rb:89:in `execute_task'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/namespaces.rb:186:in `method_missing'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/namespaces.rb:104:in `block in task'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/recipes/deploy.rb:199:in `block (3 levels) in load'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/execution.rb:56:in `transaction'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/namespaces.rb:186:in `method_missing'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/recipes/deploy.rb:198:in `block (2 levels) in load'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/execution.rb:139:in `instance_eval'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/execution.rb:139:in `invoke_task_directly'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/callbacks.rb:27:in `invoke_task_directly_with_callbacks'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/execution.rb:89:in `execute_task'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/namespaces.rb:186:in `method_missing'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/namespaces.rb:104:in `block in task'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/recipes/deploy.rb:167:in `block (2 levels) in load'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/execution.rb:139:in `instance_eval'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/execution.rb:139:in `invoke_task_directly'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/callbacks.rb:27:in `invoke_task_directly_with_callbacks'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/execution.rb:89:in `execute_task'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/configuration/execution.rb:101:in `find_and_execute_task'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/cli/execute.rb:46:in `block in execute_requested_actions'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/cli/execute.rb:45:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/cli/execute.rb:45:in `execute_requested_actions'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/cli/help.rb:19:in `execute_requested_actions_with_help'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/cli/execute.rb:34:in `execute!'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/lib/capistrano
/cli/execute.rb:14:in `execute'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/capistrano-2.6.0/bin/cap:4:in `
<top (required)>'
from C:/Ruby192/bin/cap:19:in `load'
from C:/Ruby192/bin/cap:19:in `<main>'
IP地址为IP.IP.IP.IP
部署目标的用户名是用户名
beanstalk的用户名是xxx
密码是 **
答案 0 :(得分:0)
这个问题的答案结果是我使用的Ruby 1.8.7的特定版本中存在一个错误,影响Win XP但不影响Win Vista和Win 7.