我正在尝试使用Capistrano部署PHP项目。当我尝试cap 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而且它已经在这台机器上工作了。我需要解决雪豹特有的问题吗?
修改:更新了错误
答案 0 :(得分:0)
请注意,错误显示为“回滚时异常”,这意味着当Capistrano因其他一些错误而尝试回滚时,您所看到的错误就会发生。换句话说,它是一个红鲱鱼。如果您可以从相关命令中包含capistrano的完整输出,则可能有人可以帮助您确定真正出错的地方。
答案 1 :(得分:0)
您应该检查此错误:
连接失败:192.168.2.42(NoMethodError:私有方法`split'调用42:Fixnum)
这是什么主持人?本地?并尝试检查分割的NoMethodError来自何处。
您也可以触发此cap命令,以查看目标服务器是否无法访问:
cap invoke COMMAND='ls -l'