0

In my Rails App, I scraped many data from other websites, and it's all on my local development database. Now, I want to deploy my website to Heroku, and I want to upload the local data as well, so I don't need to scrape those data again. How can I do it?

I think I can just convert the local data(just a few models) into yml, or csv, and then write a rake task to read from those file.

I'm wondering if there are better approaches.

4
  • Have you tried pg:push devcenter.heroku.com/articles/heroku-postgresql#pg-push ? Commented May 22, 2015 at 5:01
  • Related answer: stackoverflow.com/a/11356344/2150422 Commented May 22, 2015 at 5:32
  • @cqcn1991 Please do consider accepting the answer if it has helped you in solving your question . Commented May 22, 2015 at 11:04
  • @GhostBuster I'm about to, but now I'm struggling with other code problem, I'll accept once I test that gem. Commented May 22, 2015 at 11:26

1 Answer 1

2

I think what you are looking for is this

Allows you to take backup of your db using simple commands and then you just need to restore it on the live database . Quite easy .

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.