0

我正在尝试使用 Capistrano 部署一个 PHP 项目。当我尝试执行 acap deploy时,出现错误:

wes:/var/www/nipponpulse [svn:] → cap deploy
  * executing `deploy'
 ** transaction: start
  * executing `deploy:update_code'
    executing locally: "svn info https://newcitymedia.svn.beanstalkapp.com/nippon_pulse/expressionengine  -rHEAD"
/opt/local/bin/svn
  * executing "svn checkout -q  -r94 https://newcitymedia.svn.beanstalkapp.com/nippon_pulse/expressionengine /var/www/nipponpulse/releases/20091117150904 && (echo 94 > /var/www/nipponpulse/releases/20091117150904/REVISION)"
    servers: ["192.168.2.42"]
*** [deploy:update_code] rolling back
  * executing "rm -rf /var/www/nipponpulse/releases/20091117150904; true"
    servers: ["192.168.2.42"]
 ** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError,      connection failed for: 192.168.2.42 (NoMethodError: private method `split' called for 42:Fixnum)
    connection failed for: 192.168.2.42 (NoMethodError: private method `split' called for 42:Fixnum)

这是我正在使用的食谱http://pastie.textmate.org/private/7mix7xhbf3ozwjskwt5orq。我正在使用 Snow Leopard,这是我的宝石列表(使用sudo gem list --local):

actionmailer (2.3.4, 2.2.2, 1.3.6)
actionpack (2.3.4, 2.2.2, 1.13.6)
actionwebservice (1.2.6)
activerecord (2.3.4, 2.2.2, 1.15.6)
activeresource (2.3.4, 2.2.2)
activesupport (2.3.4, 2.2.2, 1.4.4)
acts_as_ferret (0.4.4, 0.4.3)
adamcooke-key-installer (1.1)
capistrano (2.5.9, 2.5.2)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
defunkt-github (0.3.4)
dnssd (1.3.1, 1.3, 0.6.0)
fastthread (1.0.7, 1.0.1)
fcgi (0.8.7)
ferret (0.11.6)
gem_plugin (0.2.3)
highline (1.5.1, 1.5.0)
hpricot (0.8.1, 0.6.164)
json_pure (1.1.9)
libxml-ruby (1.1.3, 1.1.2)
mongrel (1.1.5)
needle (1.3.0)
net-scp (1.0.2, 1.0.1)
net-sftp (2.0.2, 2.0.1, 1.1.1)
net-ssh (2.0.15, 2.0.4, 1.1.4)
net-ssh-gateway (1.0.1, 1.0.0)
open4 (0.9.6)
rack (1.0.1, 1.0.0)
rails (2.3.4, 2.2.2, 1.2.6)
rake (0.8.7, 0.8.3)
RedCloth (4.2.2, 4.1.1)
ruby-openid (2.1.7, 2.1.2)
ruby-yadis (0.3.4)
rubygems-update (1.3.5)
rubynode (0.1.5)
sqlite3-ruby (1.2.5, 1.2.4)
termios (0.9.4)
vlad (2.0.0)
xmpp4r (0.5, 0.4)

当我运行时,ruby -v我看到了这个:

ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]

我不确定它为什么会失败。我在 Rails 和 ruby​​ 方面的经验总的来说很少,但我过去使用过 Capistrano,它在这台机器上也能正常工作。我需要修复 Snow Leopard 的某些特定问题吗?

编辑:更新了错误

4

2 回答 2

0

Note that the error reads "exception while rolling back", which means that the error you're seeing occurred when Capistrano was already trying to rollback due to some other error. In other words, it's a red herring. If you can include the complete output of capistrano from the command in question, someone might be able to help you identify what really went wrong.

于 2009-11-14T22:42:59.983 回答
0

您应该检查此错误:

连接失败:192.168.2.42(NoMethodError:私有方法`split'调用42:Fixnum)

这是什么主机?当地的?并尝试检查 NoMethodError for split 的来源。

你也可以触发这个 cap 命令来查看目标服务器是否是不可访问的:

cap invoke COMMAND='ls -l'
于 2012-11-29T22:22:20.923 回答