【问题标题】:deploy:assets:precompile Issue部署:资产:预编译问题
【发布时间】:2012-10-23 17:09:11
【问题描述】:

我正在尝试通过 capistrano 将 rails 应用程序部署到 rackspace 服务器。我已经将许多 Rails 应用程序部署到 Rackspace 和 Linode 服务器,从未遇到过这样奇怪的问题。 capistrano 没有部署应用程序,下面是日志:

executing `deploy:assets:precompile'
  * executing "cd /home/deployer/apps/latty39/releases/20121023165957 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile"
    servers: ["50.56.183.16"]
    [50.56.183.16] executing command
 ** [out :: 50.56.183.16] rake aborted!
 ** [out :: 50.56.183.16] cannot load such file -- Date
 ** [out :: 50.56.183.16] 
 ** [out :: 50.56.183.16] (See full trace by running task with --trace)
    command finished in 7454ms
*** [deploy:update_code] rolling back
  * executing "rm -rf /home/deployer/apps/latty39/releases/20121023165957; true"
    servers: ["50.56.183.16"]
    [50.56.183.16] executing command
    command finished in 2001ms
failed: "sh -c 'cd /home/deployer/apps/latty39/releases/20121023165957 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile'" on 50.56.183.16

我不知道为什么会失败。我在这件事上几乎花了 3 个小时,到目前为止还没有成功。有搜索 stackoverflow 和其他资源但没有帮助。

任何解决问题的帮助将不胜感激

谢谢

【问题讨论】:

  • --trace 输出显示什么
  • @Viren:实际上没有任何东西显示在跟踪中

标签: ruby-on-rails ruby rubygems ruby-on-rails-3.2 capistrano


【解决方案1】:

我自己想通了。我有一个自定义 rake 任务,它需要 ruby​​ 日期类,例如:

require 'Date'

删除它并全部修复。但我不需要弄清楚为什么在生产中要求日期类会引发错误。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-02-05
    • 2013-06-18
    • 1970-01-01
    • 2013-11-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多