我已经通读了我可以在这里找到的所有评论和问题,但它们似乎都不适用于我的情况。我有一个 Ruby on Rails 后端,React 前端部署良好,直到我添加了管理员使用 ActiveRecord 通过 CSV 文件更新数据库的能力。
当我推送到 Heroku 时,我现在收到两个警告:
###### WARNING: Detecting rails configuration failed
##### WARNING: We detected that some binary dependencies required to use all the preview features of Active Storage are not present on this system.
我已经阅读了 Heroku 提供的有关 Heroku 上主动存储的文章,但我仍然无法解决问题。
尝试在 Rails 控制台上进行故障排除时,我收到以下可能是罪魁祸首的错误:
/app/vendor/bundle/ruby/2.5.0/gems/aws-partitions-1.144.0/lib/aws-partitions/endpoint_provider.rb:82:in block in partition_matching_region: Cannot load Rails.config.active_storage.service: (NoMethodError) undefined method match for nil:NilClass
有没有人对这个问题有任何见解?我遇到了其他人发现的相同问题:其中一些错误消息对我来说并不是最有见地的。谢谢!
最佳答案
你需要安装 Heroku 的 ActiveStorage Previews Buildpack:
heroku buildpacks:add -i 1 https://github.com/heroku/heroku-buildpack-activestorage-preview
这将安装生成 Assets 预览所需的二进制工具。更多信息请点击这里:
关于ruby-on-rails - Heroku 部署上的 Rails 配置失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55171536/