Hello, I have a problem, I'm trying to deploy on h...
# support
ю
Hello, I have a problem, I'm trying to deploy on heroku, sqlite database executed in the rails console db:migrate and when I try to open the main page, there is an error 500, in the logs that on the screen "Could not find table (spree_pages)" is probably a bug with migration and I can't figure out how to fix it. I will be very grateful for your help
w
Hey! Heroku has an ephemeral filesystem that may remove your SQLite database files at any moment. You can use SQLite for local development, but you should instead use something like PostgreSQL on Heroku. Please, see https://devcenter.heroku.com/articles/sqlite3 for more complete information. I hope that helps.
ю
Hello, this saved my situation but deleted the products in the store and the admin account, can you tell me how can I create a new admin account through the console?
w
Try running
heroku run rails db:reset
, be aware that will delete all your data on that database
ю
But how does this help create an administrator account?
I understand that I can not save the data from the sql table, so I would just be able to re-create the user admin to manually enter all the goods again
w
Well, the command I posted will populate with a test admin account, unless I’m wrong. Of course, you’ll still need to update it before being ready for production. What is your exact situation? Is your store already on production?
ю
Yes, the store works for heroku, the list of goods that was there was just cleared and the administrator account disappeared
w
How did you populate that data in the past?
ю
I created each product from the admin panel, and I created the admin account at the very beginning of the solidus installation
heroku run rails db:seed Thanks, typing this command and re-creating the admin helped me
w
cool, that will also add other seed data
in case you need to do it again and only want the user, you can run:
Copy code
heroku run bundle exec rake spree_auth:admin:create