我很困惑該怎麼做才能讓Capistrano更新。Ruby on Rails卡皮斯特拉諾更新版本
我已經對git進行了修改。好吧,我會寫所有我採取的步驟。
- git的承諾-a
- 混帳推 (成功推送到遠程的Git倉庫中的所有文件。注意所有的變化)
- 帽部署
不過,這並不部署最新該網站的版本。
實際上,它部署了最早的版本。
章部署響應
triggering load callbacks
* 2013-07-13 17:09:08 executing `deploy:update'
** transaction: start
* 2013-07-13 17:09:08 executing `deploy:update_code'
executing locally: "git ls-remote ssh://[email protected]/~/liquid_admin.git master"
command finished in 3150ms
* executing "git clone -b master --depth 1 ssh://[email protected]/~/liquid_admin.git /home/ubuntu/liquid_admin/releases/20130713150911 && cd /home/ubuntu/liquid_admin/releases/20130713150911 && git checkout -b deploy d609108bf81df3cb558f7536c3cee98d852b4ec5 && git submodule init && git submodule sync && export GIT_RECURSIVE=$([ ! \"`git --version`\" \\< \"git version 1.6.5\" ] && echo --recursive) && git submodule update --init $GIT_RECURSIVE && rm -Rf /home/ubuntu/liquid_admin/releases/20130713150911/.git && (echo d609108bf81df3cb558f7536c3cee98d852b4ec5 > /home/ubuntu/liquid_admin/releases/20130713150911/REVISION)"
servers: ["54.229.78.34"]
[54.229.78.34] executing command
** [54.229.78.34 :: out] Cloning into '/home/ubuntu/liquid_admin/releases/20130713150911'...
** [54.229.78.34 :: out] remote: Counting objects: 276, done.
remote: Compressing objects: 1% (3/239)
** [54.229.78.34 :: out] remote: Compressing objects: 2% (5/239)
** [54.229.78.34 :: out] remote: Compressing objects: 3% (8/239)
** [54.229.78.34 :: out] remote: Compressing objects: 4% (10/239)
** [54.229.78.34 :: out] remote: Compressing objects: 5% (12/239)
** [54.229.78.34 :: out] remote: Compressing objects: 6% (15/239)
(那麼多了很多那些地獄然後...)
** [54.229.78.34 :: out] Resolving deltas: 100% (58/58), done.
** [54.229.78.34 :: out] Switched to a new branch 'deploy'
command finished in 5206ms
* 2013-07-13 17:09:19 executing `deploy:finalize_update'
triggering before callbacks for `deploy:finalize_update'
* 2013-07-13 17:09:19 executing `bundle:install'
* executing "cd /home/ubuntu/liquid_admin/releases/20130713150911 && bundle install --gemfile /home/ubuntu/liquid_admin/releases/20130713150911/Gemfile --path /home/ubuntu/liquid_admin/shared/bundle --deployment --quiet --without development test"
servers: ["54.229.78.34"]
[54.229.78.34] executing command
command finished in 2138ms
* executing "chmod -R -- g+w /home/ubuntu/liquid_admin/releases/20130713150911 && rm -rf -- /home/ubuntu/liquid_admin/releases/20130713150911/public/system && mkdir -p -- /home/ubuntu/liquid_admin/releases/20130713150911/public/ && ln -s -- /home/ubuntu/liquid_admin/shared/system /home/ubuntu/liquid_admin/releases/20130713150911/public/system && rm -rf -- /home/ubuntu/liquid_admin/releases/20130713150911/log && ln -s -- /home/ubuntu/liquid_admin/shared/log /home/ubuntu/liquid_admin/releases/20130713150911/log && rm -rf -- /home/ubuntu/liquid_admin/releases/20130713150911/tmp/pids && mkdir -p -- /home/ubuntu/liquid_admin/releases/20130713150911/tmp/ && ln -s -- /home/ubuntu/liquid_admin/shared/pids /home/ubuntu/liquid_admin/releases/20130713150911/tmp/pids"
servers: ["54.229.78.34"]
[54.229.78.34] executing command
command finished in 756ms
* executing "find /home/ubuntu/liquid_admin/releases/20130713150911/public/images /home/ubuntu/liquid_admin/releases/20130713150911/public/stylesheets /home/ubuntu/liquid_admin/releases/20130713150911/public/javascripts -exec touch -t 201307131509.22 -- {} ';'; true"
servers: ["54.229.78.34"]
[54.229.78.34] executing command
** [out :: 54.229.78.34] find:
** [out :: 54.229.78.34] `/home/ubuntu/liquid_admin/releases/20130713150911/public/images'
** [out :: 54.229.78.34] : No such file or directory
** [out :: 54.229.78.34]
** [out :: 54.229.78.34] find:
** [out :: 54.229.78.34] `/home/ubuntu/liquid_admin/releases/20130713150911/public/stylesheets'
** [out :: 54.229.78.34] : No such file or directory
** [out :: 54.229.78.34]
** [out :: 54.229.78.34] find:
** [out :: 54.229.78.34] `/home/ubuntu/liquid_admin/releases/20130713150911/public/javascripts'
** [out :: 54.229.78.34] : No such file or directory
** [out :: 54.229.78.34]
command finished in 767ms
* 2013-07-13 17:09:23 executing `deploy:create_symlink'
* executing "sudo -p 'sudo password: ' rm -f /home/ubuntu/liquid_admin/current && sudo -p 'sudo password: ' ln -s /home/ubuntu/liquid_admin/releases/20130713150911 /home/ubuntu/liquid_admin/current"
servers: ["54.229.78.34"]
[54.229.78.34] executing command
command finished in 837ms
** transaction: commit
UPDATE
我做「帽部署:更新「,並更新了一些的文件。例如我的database.yml已更新。但沒有新的觀點,新的控制器,或者新型號有...
更新2
它似乎只改變了我的第一次部署期間存在的文件。因此,「帖子」和「家庭」以及所有這些都改變了......但是之後我所做的任何新的控制器,模型或視圖都沒有部署。
你可以粘貼Capistrano輸出嗎?還git登錄你的遠程和本地? – juanpastas
沒有更多的細節,這是一個猜測,但如果你在git中有多個分支你應該確保capistrano正在從正確的部署。這是通過'set:branch','branch_name''行完成的。 –
粘貼上限輸出。我在哪裏可以找到git日誌?在本地或遠程服務器上? –