Capistrano error deploy.rb: warning: failed to set environment variable
Running Capistrano from a WinXP machine. Deploying from Beanstalk repo to Linux box.
Everything works perfectly with the exact same capfile and installation details on my Mac OS X 10.6 machine, but I can't get things to function correctly on the Win XP machine.
Looked at lines 95 and 104 of deploy.rb since these seemed to cause some issues, but wasn't able to figure anything out. At a bit of a loss :-[
The exact log of the deploy attempt is:
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/namesp开发者_运维百科aces.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 address is IP.IP.IP.IP
username for deploy target is username username for beanstalk is xxx passwords are **The answer for this problem turned out to be that there was a bug in the specific version of Ruby 1.8.7 that I was using, affecting Win XP but not Win Vista and Win 7.
精彩评论