【问题标题】:Dokku deploy failing with upgraded Rails 6.0 applicationDokku 部署失败,升级 Rails 6.0 应用程序
【发布时间】:2021-06-10 16:43:46
【问题描述】:

我一直在将 Rails 5.2 应用程序升级到 Rails 6。我尚未安装 Webpack,但在 Dokku(与 Heroku 具有类似的构建系统)上出现以下部署错误:

webpack binstubs not found.
Have you run rails webpacker:install ?
Make sure the bin directory or binstubs are not included in .gitignore
Exiting!

!
!     Precompiling assets failed.
!

This is similar error but from a new project and had different answer

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-6 webpacker dokku


    【解决方案1】:

    如果你正在使用 Dokku(也许是 Heroku?)在你准备好迁移到 Webpacker 之前不要添加 Webpacker gem。

    Rails 6 默认将 Webpacker 引入到 Gemfile 中,我在升级过程中不假思索地复制了它。我已经添加了 Gem,但我还没有从 Sprockets 迁移到在 Webpacks 中使用 Javascript(Rails 6 中的默认设置)。

    在部署期间,Dokku 在 gemfile 中看到了 Webpacker gem,并期望 Webpacker 已经安装,但实际上并没有安装 - 导致错误。

    从 Gemfile 中删除 Webpacker 解决了这个问题,直到我准备好查看 Webpacker。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-25
      • 1970-01-01
      • 2016-06-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多