0

I just downloaded a project from github and installed the environment and it is running. I have migrated the database and I have the structure of all tables. But there is no data in any tables. There is a database in the github project named development.sqlite3. Now what I need is to dump the data from development.sqlite3 to my project database. How can I do this?

I am in windows. I tried to look into other answers here but I am lost somehow. Please help.

asdfkjasdfjk
  • 3,784
  • 18
  • 64
  • 104
  • this any use? http://stackoverflow.com/questions/12275872/copy-sqlite-database-to-another-path – Max Williams Oct 13 '15 at 14:41
  • Answered here, too: http://stackoverflow.com/questions/29172629/rails-will-i-lose-my-development-database-when-i-push-to-production/29173778#29173778 – Elvn Oct 13 '15 at 14:54

1 Answers1

0

You can use the gem seed_dump to get the data out of one db and have it ready for import into another.

https://github.com/rroblak/seed_dump

You can dump the data with this command:

rake db:seed:dump

And you can populate your new database with this:

bundle exec rake db:seed
trh
  • 7,186
  • 2
  • 29
  • 41