0

Hello I am trying to deploy my rails app from cloud9 via git to heroku. I am able to push all of my changes to git and then push the data to heroku with

git push heroku master

next I migrate my database to heroku

heroku run rake db:migrate

However, when I visit the app on heroku, my data from the database does not show up. How can I fix this?

alexbt
  • 16,415
  • 6
  • 78
  • 87
AaronDT
  • 3,940
  • 8
  • 31
  • 71

1 Answers1

0

You're using 2 seperate databases. Migrate doesn't add the data. Just copy the database structure, but it's a new database.

Now you either re-create the data to the database on Heroku or you connect to your local database remotly though database.yml

Boltz0r
  • 970
  • 5
  • 16
  • Hello Boltz0r, thank you very much for your answer! Can you please tell me how to copy the database structure and how to re-create it? Or is there any link where to read how this works? I am fairly new to rails and git :S – AaronDT Jun 06 '16 at 14:48
  • there is no way to copy the data from one to the other... what you can do is connect to your local database. See this: http://stackoverflow.com/questions/7304576/how-do-i-set-up-the-database-yml-file-in-rails – Boltz0r Jun 06 '16 at 14:51