开发者

Some troubles with deploy rails application

I created rails application, it works great in development environment, but now I want to deploy it. I have a vps with passenger and nginx, I deployed rails application with static pages, but now application needs database. Which best way to clone structure from development base and then deploy it? Please give any guides to deploy application? I use (ubuntu 10.0开发者_JAVA技巧4_64, rails 3.0.6)


It sounds like you want a copy of your development database (structure and data).

If you are using a sqlite3 database in development (which you probably are), then on the server (after you've deployed) make a copy of it and name it production.sqlite3

cp development.sqlite3 production.sqlite3

This will copy the structure and data of your development database. If its a static site however, you could do this on the development machine before you deploy.

Let me know if you need instructions to do this for mysql (or any other database) and I will edit this answer.


rake db:migrate RAILS_ENV=production

or I misunderstood the question?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜