开发者

How to keep the data moving from development to production DB: Rails3 application

Boys and girls,

So, I have finished my Rails3 webapp and I am trying to deploy it. Am using Passenger, I have managed to configure it as to point to the rails app, that is fine.

Now, since in development i have made of course changes to the app and I want to deploy it with the data i have imported until now. I tried to "rake db:migrate RAILS_ENV=production, but the data are lost! Even the users I have created while developing are lost and need to create them again...

Isn't there any way to keep the data while moving from development to production environments?

T开发者_JS百科hank you very so much...


Previously I have used the yaml_db gem to do export from one environments db to another and it's worked great.

That said, running migrations shouldn't cause all your data to disappear. Is your db being destroyed and then re-created or is it actually emptying the tables? Also, how are you deploying the app to production - using capistrano? If so check that there are no unwanted extra tasks being run as part of the deployment

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜