我很担心如何让Capistrano更新。
我已将我的更改提交给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://ubuntu@54.229.78.34/~/liquid_admin.git master"
command finished in 3150ms
* executing "git clone -b master --depth 1 ssh://ubuntu@54.229.78.34/~/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
更新
我做了“cap deploy:update”并更新了部分文件。例如,我的database.yml已更新。但是没有新视图,新控制器或新模型......
更新2
似乎只更改了我第一次部署期间存在的文件。所以“帖子”和“主页”以及所有内容都发生了变化......但是我之后制作的任何新的控制器,模型或视图都没有被部署。
答案 0 :(得分:1)
Cap部署通常是部署主服务器..您是否在不同的分支中进行了更改而忘记了将其合并?