0

昨晚做了一个大更新,我的网站目前已关闭。我cap deploy:rollback没有运气使用。错误日志并没有告诉我太多。我在尝试部署时看到的最后一个错误是:

 ** [out :: website.com] You are trying to install in deployment mode after changing
 ** [out :: website.com] your Gemfile. Run `bundle install` elsewhere and add the
 ** [out :: website.com] updated Gemfile.lock to version control.
 ** [out :: website.com] 
 ** [out :: website.com] You have deleted from the Gemfile:
 ** [out :: website.com] * asset_sync
    command finished in 934ms

cap tail只是说以下没有错误:

Migrating to AddSessionsTable (20120722094547)
Migrating to AddSlugToUserProjects (20120723204816)
Migrating to AddSlugIndexToUserProjects (20120723205558)
Migrating to CreateFriendlyIdSlugs (20120723210904)
Migrating to AddNameToUsers (20120723221700)
Migrating to AddSlugToUsers (20120723222456)
Migrating to CreateComments (20120724203252)

有什么帮助吗?

4

3 回答 3

0

bundle install在您的开发服务器上运行,然后cap deploy. 另一种可能的解决方案:添加asset_sync回您的 Gemfile。

作为最后的手段,您可以运行cap -d deploy. 它将逐步运行部署,要求您继续执行每一步。在单独的 shell 中登录到生产服务器,并在步骤之间手动进行一些调整。

于 2012-07-26T15:39:04.810 回答
0

看起来 Gemfile 的更改并不顺利。它是如何修复的:

  1. 登录到服务器,有 6 个 ruby​​ 进程正在占用所有可用的东西。这几乎可以肯定是独角兽进程试图启动但无法……killall -9 ruby
  2. cd 进入应用程序的当前目录
  3. RAILS_ENV=production bundle exec rake assets:precompile
  4. 服务 unicorn_whimseybox 开始

看起来(在 unicorn.log 中),错误是:E,[2012-07-26T17:27:10.552912 #24818] ERROR -- : uninitialized constant AssetSync (NameError)

于 2012-07-26T18:24:36.647 回答
0

将一些 Gemfilesource行转换为块后,我遇到了同样的错误。

该错误是由于生产中的旧 Bundler 版本(1.7.3)与开发中的 1.8.3 造成的。

于 2015-03-03T11:31:23.513 回答