0
I’m new to Rails and I’m also learning how to use databases. I’m trying to create a blog that currently has a table that already contains some data. What happens is that I was using the notebook to develop the blog and now when I cloned it from git to my PC, the data I had in the table is gone. When I spin rails server
get that mistake:
Migrations are pending.
To resolve this issue, run: bin/rails db:migrate RAILS_ENV=development".
By running this code it creates a table without the data I already had in it. What I am doing wrong and how can I recover the data?
but where’s the database file? if it’s outside your git repository it won’t go up in the commit itself (if it’s in gitignore tb)
– Lucas Miranda
I was able to solve it using this Gem : https://github.com/rroblak/seed_dump. Basically he saved the data in the file Seeds.Rb and then filled the table for me. Thank you very much xD
– Guilherme PS