[英]How to update Ruby on Rails app after deployment?
Let's say I have deployed my Rails app on a VPS, and everything works fine. 假设我已经在VPS上部署了Rails应用程序,并且一切正常。 MySQL is populating.
MySQL正在填充。
Then I wanna change the functionality or view of the app. 然后,我想更改应用程序的功能或视图。 What should I do next?
接下来我该怎么办?
Probably using CentOS, Passanger, nginx, MySQL and GIT. 可能使用CentOS,Passanger,nginx,MySQL和GIT。
There's several tools that can help you with this kind of things, I think the most widely used is Capistrano . 有几种工具可以帮助您解决这类问题,我认为使用最广泛的工具是Capistrano 。 But in essence it's nothing magical.
但从本质上讲,这没有什么神奇的。 Upload the new code and it should be ready to go.
上载新代码,应该可以使用了。 If you have done any modifications to the database, you should take the app offline before upgrading it, then run migrations, and go back online again.
如果您已对数据库进行了任何修改,则应先使该应用程序脱机,然后再对其进行升级,然后运行迁移,然后再次联机。
You can use capistrano to deploy new versions of your application. 您可以使用capistrano部署应用程序的新版本。
The idea is to develop locally, run and test the application locally. 这个想法是在本地开发,在本地运行和测试应用程序。
And when you're ready to deploy, you use capistrano to update the source code in the production server. 当您准备好进行部署时,可以使用capistrano更新生产服务器中的源代码。
它也有助于了解数据库迁移 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.