10

I just created a simple application for products and shopping cart with names, price and attachments. It's working fine without any issues. I decided to create admin and authentication using rails-admin gem and devise respectively.

I have followed the instructions as explained here. It all worked fine until I got to the rails_admin part. I did everything as described except using rails_admin 1.3 version as described on the github page. I also tried the older version on the link but I encounter this error each time

PG::UndefinedTable - ERROR:  relation "active_storage_attachments" does    not exist
 LINE 8:                WHERE a.attrelid = '"active_storage_attachmen...

I do not have any table by the name 'active_storage_attachments'. I found active_storage on the config file so I'm guessing this might be something caused by Rails configuration. Any assistance will be appreciated. If there is need to show some code from my app, I'll do that, although it's quite a huge code already.

Thanks in advance.

KH_
  • 305
  • 4
  • 13
  • Did you try to reset the db as described here https://stackoverflow.com/questions/19097558/pg-undefinedtable-error-relation-users-does-not-exist? – John Doe Jun 11 '18 at 20:04
  • Yes, i tried all of those but nothing worked. Thanks. – KH_ Jun 11 '18 at 20:09

1 Answers1

20

Did you run rails active_storage:install as described on this page? I believe this error might be due to your product attachments and the configuration which you mentioned.

John Doe
  • 596
  • 5
  • 8