【问题标题】:use capstrano deploy rails app to VPS appear config.eager_load is set to nil使用 capstrano deploy rails app to VPS 出现 config.eager_load 设置为 nil
【发布时间】:2019-06-14 08:22:02
【问题描述】:

使用 capistrano 部署 rails app 然后出现

[deploy:migrate] Run `rake db:migrate`
00:37 deploy:migrating
      01 $HOME/.rbenv/bin/rbenv exec bundle exec rake db:migrate
      01 config.eager_load is set to nil. Please update your config/environments/*.rb files accordingly:
      01
      01   * development - set it to false
      01   * test - set it to false (unless you use a tool that preloads your test environment)
      01   * production - set it to true
      01

在我的代码中已经设置为与上面相同

在 SO 中找不到有效的解决方法

【问题讨论】:

    标签: ruby-on-rails capistrano


    【解决方案1】:

    您还必须在config/deploy/production.rb中设置舞台

    set :stage, :production

    你也可以设置分支来部署 -

    set :branch, :branch_name

    或者它可能会从缓存中读取,因此您可以删除目录并重新部署它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-03-18
      • 2017-04-18
      • 2019-03-21
      • 1970-01-01
      • 1970-01-01
      • 2016-08-25
      • 1970-01-01
      相关资源
      最近更新 更多