5

I'm working on a simple Rails (activeRecord based) application, and i'm testing in locally.

Now it's time to move online, but... do i need to insert all the records again in the app's db? I hope not!

Do you know a if is it possible to make a copy of my entire local db and import it in heroku?

Thanks!

2
  • 1. Which database? mysql? 2. what is heroku? Commented Apr 25, 2011 at 17:42
  • sqlite3. Heroku is a great ruby on rails hosting service! I suggest you to try it Commented Apr 25, 2011 at 18:13

2 Answers 2

12

erm, using the Heroku CLI

heroku db:push

job done, built into Heroku - will magically transpose your local DB whether it be sqlite, mysql, postgres to Heroku's shared postgresql db.

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

3 Comments

Worked just fine for me. You have to have the taps gem installed.
What if the remote db is not empty? ` push from LOCAL_SOURCE_DATABASE to REMOTE_TARGET_DATABASE REMOTE_TARGET_DATABASE must be empty.
3

Try yaml_db gem

https://github.com/ludicast/yaml_db

1 Comment

and totally unnecessary when it comes to Heroku.

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.