如何在生产服务器中升级rvm和ruby版本

时间:2022-08-24 07:00:45

I have a production server with nginx and ruby 1.9.3p125 (2012-02-16 revision 34643).

我有一个生产服务器,有nginx和ruby 1.9.3p125(2012-02-16修订版34643)。

I have taken a look to http://www.ruby-lang.org/en/news/2012/11/09/ruby-1-9-3-p327-is-released/ and I want upgrade to ruby-1-9-3-p327 to fix security bugs.

我已经看了http://www.ruby-lang.org/en/news/2012/11/09/ruby-1-9-3-p327-is-released/我希望升级到ruby-1 -9-3-p327修复安全漏洞。

Where can I find a manual or tutorial to upgrade ruby version and my rvm version?

我在哪里可以找到升级ruby版本和rvm版本的手册或教程?

Thank you

2 个解决方案

#1


5  

First upgrade RVM:

首先升级RVM:

rvm get stable

Then upgrade installed Ruby:

然后升级安装的Ruby:

rvm upgrade ruby-1.9.3-p125 ruby-1.9.3-p327

https://rvm.io/rubies/upgrading/

#2


1  

If your app cannot suffer any downtime, it is wise to duplicate your production environment locally, performing the upgrade through rvm as NARKOZ points out and then running your tests to ensure everything still works as expected.

如果您的应用程序不会遭受任何停机,那么在本地复制您的生产环境,通过rvm执行升级是明智的,因为NARKOZ指出然后运行您的测试以确保一切仍然按预期工作。

You can use something like VirtualBox to keep the clone separate from your dev environment.

您可以使用VirtualBox之类的东西将克隆与开发环境分开。

Once you're confident everything works, then do the upgrade. I'd even recommend taking a snapshot backup of your server before proceeding.

一旦你确信一切正常,那么就进行升级。我甚至建议您在继续之前对服务器进行快照备份。

Good Luck.

#1


5  

First upgrade RVM:

首先升级RVM:

rvm get stable

Then upgrade installed Ruby:

然后升级安装的Ruby:

rvm upgrade ruby-1.9.3-p125 ruby-1.9.3-p327

https://rvm.io/rubies/upgrading/

#2


1  

If your app cannot suffer any downtime, it is wise to duplicate your production environment locally, performing the upgrade through rvm as NARKOZ points out and then running your tests to ensure everything still works as expected.

如果您的应用程序不会遭受任何停机,那么在本地复制您的生产环境,通过rvm执行升级是明智的,因为NARKOZ指出然后运行您的测试以确保一切仍然按预期工作。

You can use something like VirtualBox to keep the clone separate from your dev environment.

您可以使用VirtualBox之类的东西将克隆与开发环境分开。

Once you're confident everything works, then do the upgrade. I'd even recommend taking a snapshot backup of your server before proceeding.

一旦你确信一切正常,那么就进行升级。我甚至建议您在继续之前对服务器进行快照备份。

Good Luck.