ruby-on-rails - Capistrano/Mercurial/tar "time stamp in the future"消息

标签 ruby-on-rails mercurial capistrano tar

使用 capistrano 部署 Rails 应用程序时,我遇到了间歇性问题。将 .gz 上传到服务器后,日志显示来自 tar 的错误,表示时间戳是将来的(参见下面的输出)。对于应用程序中的每个文件,此消息重复出现。

我将服务器时间与 .tar.gz 文件的数字名称进行了比较,确实提前了几分钟。但这与文件上的实际时间戳有何关联?我怎样才能让我的更改正确部署?

** sftp upload /var/folders/lo/loIUAyGAHFWqSREiNHhm-E+++TI/-Tmp-/20110603143429.tar.gz -> /tmp/20110603143429.tar.gz
   [123.45.67.890] /tmp/20110603143429.tar.gz
   [123.45.67.890] done
 * sftp upload complete
 * executing "cd /home/blah/releases && tar xzf /tmp/20110603143429.tar.gz && rm /tmp/20110603143429.tar.gz"
   servers: ["123.45.67.890"]
   [123.45.67.890] executing command
** [out :: 123.45.67.890] tar: 20110603143429/.autotest: time stamp 2011-06-03 14:34:33 is 368.72042712 s in the future
** [out :: 123.45.67.890] tar: 20110603143429/.bundle: time stamp 2011-06-03 14:34:33 is 368.719540808 s in the future
** [out :: 123.45.67.890] tar: 20110603143429/.hgignore: time stamp 2011-06-03 14:34:33 is 368.719465444 s in the future
** [out :: 123.45.67.890] tar: 20110603143429/app: time stamp 2011-06-03 14:34:34 is 369.719382175 s in the future

 ** [out :: 123.45.67.890] tar: 20110603143429: time stamp 2011-06-03 14:34:49 is 383.369448435 s in the future
    command finished in 1616ms
  * executing `deploy:finalize_update'
  * executing "chmod -R g+w /home/blah/releases/20110603143429"
    servers: ["123.45.67.890"]
    [123.45.67.890] executing command
    command finished in 193ms
  * executing "rm -rf /home/blah/releases/20110603143429/log /home/blah/releases/20110603143429/public/system /home/blah/releases/20110603143429/tmp/pids &&\\\n      mkdir -p /home/blah/releases/20110603143429/public &&\\\n      mkdir -p /home/blah/releases/20110603143429/tmp &&\\\n      ln -s /home/blah/shared/log /home/blah/releases/20110603143429/log &&\\\n      ln -s /home/blah/shared/system /home/blah/releases/20110603143429/public/system &&\\\n      ln -s /home/blah/shared/pids /home/blah/releases/20110603143429/tmp/pids"
    servers: ["123.45.67.890"]
    [123.45.67.890] executing command
    command finished in 257ms
  * executing "find /home/blah/releases/20110603143429/public/images /home/blah/releases/20110603143429/public/stylesheets /home/blah/releases/20110603143429/public/javascripts -exec touch -t 201106031435.03 {} ';'; true"
    servers: ["123.45.67.890"]
    [123.45.67.890] executing command
    command finished in 1911ms
    triggering after callbacks for `deploy:update_code'
  * executing `bundle:install'
  * executing "ls -x /home/blah/releases"
    servers: ["123.45.67.890"]
    [123.45.67.890] executing command
    command finished in 140ms
  * executing "bundle install --gemfile /home/blah/releases/20110603143429/Gemfile --path /home/blah/shared/bundle --deployment --quiet --without development test"
    servers: ["123.45.67.890"]
    [123.45.67.890] executing command
 ** [out :: 123.45.67.890] sh: bundle: not found
    command finished in 158ms
*** [deploy:update_code] rolling back
  * executing "rm -rf /home/blah/releases/20110603143429; true"
    servers: ["123.45.67.890"]
    [123.45.67.890] executing command
    command finished in 261ms
failed: "sh -c 'bundle install --gemfile /home/blah/releases/20110603143429/Gemfile --path /home/blah/shared/bundle --deployment --quiet --without development test'" on 123.45.67.890

最佳答案

听起来你有时钟偏差。参与该过程的所有计算机——那些提交、发送、接收/部署的计算机?

关于ruby-on-rails - Capistrano/Mercurial/tar "time stamp in the future"消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6228955/

相关文章:

version-control - 防止在 mercurial 中推送目录

ruby-on-rails - 如何在 Capistrano 部署脚本中使用 Rails 环境变量?

ruby-on-rails - ruby 中的哈希和函数参数

mercurial - 如何比较 2 个 Mercurial 分支之间的变更集集?

javascript - 覆盖 Bootstrap 有错误类

Mercurial 信任问题

ruby-on-rails - 获取有关 Capistrano 任务的更多信息

ruby-on-rails - Capistrano 部署删除数据库?

jquery - Rails 4 TurboLinks 和 jQuery 动态链接效果不佳

ruby-on-rails - 康康舞能力在单独的文件中