Rails Heroku database missing data -


i'm new rails , heroku. don't partly understand system of databases (testing, production, development).

i created 2 rails apps. first rails' default sqlite db , second heroku-supported postgres db. created simple data , pushed apps heroku, heroku absolutely ignores db data.

what didn't understand? or advice me easier way how can deploy rails app? live in czech republic rails's not widespread nobody can advice me.

edit:

first app' db config

development:   adapter: sqlite3   database: db/development.sqlite3   pool: 5   timeout: 5000  test:   adapter: sqlite3   database: db/test.sqlite3   pool: 5   timeout: 5000  production:   adapter: sqlite3   database: db/production.sqlite3   pool: 5   timeout: 5000 

second app' db config

development:   adapter: postgresql   encoding: unicode   database: poet2_development   pool: 5   username: poet2   password: psql  test:   adapter: postgresql   encoding: unicode   database: poet2_test   pool: 5   username: poet2   password: psql  production:   adapter: postgresql   encoding: unicode   database: poet2_production   pool: 5   username: poet2   password: psql 

the problem heroku uses different database when test app locally in computer. so, data create in database of app while using locally not passed down when push app heroku.

the solution adding initial data heroku database use seeding: http://edgeguides.rubyonrails.org/migrations.html#migrations-and-seed-data. read documentation , watch railcasts http://railscasts.com/episodes/179-seed-data should explain everything

good luck.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -