PG数据库不存在关系“ active_storage_attachments”

时间:2019-05-09 10:41:18

标签: ruby-on-rails rails-activestorage

我有一个Rails项目,我正尝试将其部署到Heroku,但出现以下错误:

enter image description here

  

ActiveRecord :: StatementInvalid(PG :: UndefinedTable:错误:关系“ active_storage_attachments”不存在

我已经查看了有关此问题的先前问题,并且尝试了以下操作:

  • 重置数据库并再次运行迁移文件
  • 运行“ rails active_storage:install”

我正在使用以下依赖项,并且已将ActiveStorage配置为使用Amazon S3:

enter image description here

1 个答案:

答案 0 :(得分:0)

在您的 config / environments / production.rb 中,确保已将活动存储服务设置为亚马逊:

config.active_storage.service = :amazon
相关问题