2012-10-23 115 views
0

我剛剛部署了一個使用我的capistrano的舊項目,並且它部署正常,但我需要回滾。當我嘗試回滾使用命令「帽部署:回滾」我得到這個錯誤:capistrano無法找到以前的版本

[Deprecation Warning] Naming tasks with before_ and after_ is deprecated, please see the new before() and after() methods. (Offending task name was before_update_code) 
[Deprecation Warning] Naming tasks with before_ and after_ is deprecated, please see the new before() and after() methods. (Offending task name was after_update_code) 
    * executing `deploy:rollback' 
    * executing `deploy:rollback:revision' 
    * executing "ls -x /home/<my user>/<my project>/releases" 
    servers: ["www.my_webserver.com"] 
    [www.my_webserver.com] executing command 
    command finished 
    * executing "rm /home/<my user>/<my project>/current; ln -s /home/<my user>/<my project>/releases/20121023110110 /home/<my user>/<my project>/current" 
    servers: ["www.my_webserver.com"] 
    [www.my_webserver.com] executing command 
    command finished 
    triggering after callbacks for `deploy:rollback:revision' 
    * executing `bundler:install' 
    * executing "cd /home/<my user>/<my project>/releases/20121023112609 && bundle install" 
    servers: ["www.my_webserver.com"] 
    [www.my_webserver.com] executing command 
** [out :: www.my_webserver.com] bash: line 0: cd: /home/<my user>/<my project>/releases/20121023112609: No such file or directory 
    command finished 
failed: "rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell '1.9.2' -c 'cd /home/<my user>/<my project>/releases/20121023112609 && bundle install'" on www.my_webserver.com 

如果我開始「帽殼」,有一個快看我找不到20121023112609目錄,它在尋找。

cap> ls -x /home/<my user>/<my project>/releases 
** [out :: www.my_webserver.com] 20120418231223 20120419004108 20120421030033 20120422072111 20120422101603 
** [out :: www.my_webserver.com] 20120526035027 20120526113216 20120528100439 20120528102509 20120528135335 
** [out :: www.my_webserver.com] 20120604090722 20120724142113 20121008114048 20121008114947 20121008125600 
** [out :: www.my_webserver.com] 20121015121531 20121015122225 20121023110110 20121023111648 

我可以看到我的最新部署是有,但它被稱爲「20121023111648」和以前的部署,我想恢復到被稱爲「20121023110110」。

看起來好像有時差嗎?

回答

0

看看你的答案在這裏railsless-deploy

cap deploy:rollback 

回滾執行上面的命令。

+0

這就是我正在運行,但如果你看看輸出結果我得到一個失敗的消息。 – map7