I just created a RoR shopify app, with the following generator:
rails generate shopify_app --api_key <your_api_key> --secret <your_app_secret>
I added my domain to the whitelisted urls and everything but I keep getting this error, it seems like there is something broken inside the shopify app.
Also I already ran all the migrations, and checked in my console something lile Shop.last, to check that the model and db table DO exit.
My website is: application.delgic.com
My public key is: 94b2036e3d9c56ba430a6d33a3bb7ba7
The error appears when I put the site's url in my app in order to install it on it (application.delgic.com)
F, [2018-05-01T22:01:18.149098 #22506] FATAL -- : [cd2e0b4c-5dfd-422b-959f-7e191bc47ff1]
F, [2018-05-01T22:01:18.149175 #22506] FATAL -- : [cd2e0b4c-5dfd-422b-959f-7e191bc47ff1]
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "shops" does not exist
LINE 8: WHERE a.attrelid = '"shops"'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
(SELECT c.collname FROM pg_collation c, pg_type t
WHERE c.oid = a.attcollation AND t.oid = a.atttypid AND a.attcollation <> t.typcollation),
col_description(a.attrelid, a.attnum) AS comment
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"shops"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
):
F, [2018-05-01T22:01:18.149262 #22506] FATAL -- : [cd2e0b4c-5dfd-422b-959f-7e191bc47ff1]
F, [2018-05-01T22:01:18.149329 #22506] FATAL -- : [cd2e0b4c-5
Did you ever solve this? I am getting the same error during the callback step of OAuth. I deployed my app (built using shopify-cli) to Heroku and followed their instructions on how to migrate from sqlite to pg. The same app is still functioning for me in localhost.
Edit: I solved it by running heroku run rake db:migrate and it worked.
User | Count |
---|---|
12 | |
12 | |
10 | |
8 | |
7 |