如何在Amazon Linux系统中升级ruby版本? [英] How to upgrade ruby version in Amazon Linux system?

查看:215
本文介绍了如何在Amazon Linux系统中升级ruby版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Padrino红宝石框架开发了红宝石应用程序. 而且我想将其部署在亚马逊上.

I have developed ruby application using padrino ruby framework. And I would like to deploy it on Amazon.

我使用了这张图片. Amazon Linux AMI 2017.09.1(HVM),SSD卷类型

I used this image. Amazon Linux AMI 2017.09.1 (HVM), SSD Volume Type

图片描述为:

"Amazon Linux AMI是受EBS支持,AWS支持的映像.默认映像包括AWS命令行工具,Python,Ruby,Perl和Java.存储库包括Docker,PHP,MySQL,PostgreSQL和其他包."

"The Amazon Linux AMI is an EBS-backed, AWS-supported image. The default image includes AWS command line tools, Python, Ruby, Perl, and Java. The repositories include Docker, PHP, MySQL, PostgreSQL, and other packages."

启动实例后,我测试了ruby版本,它是ruby 2.0.0p648 (2015-12-16) [x86_64-linux],但是我需要ruby2.4来部署padrino框架. 我试图更新ruby版本,但整天都没有成功. 控制台显示当前版本为最新版本,并且没有ruby2.4 如何解决?(我将gem版本更新为2.7.2)

After launching instance, I tested ruby version and it was ruby 2.0.0p648 (2015-12-16) [x86_64-linux] but I need ruby2.4 to deploy padrino framework. I tried to update ruby version with no success for whole day. console says current version is latest version and there is no ruby2.4 How to solve this?(I updated gem version to 2.7.2)

推荐答案

如果您正在运行 Amazon使用

If you are running Amazon Linux 2, later versions of popular software packages (including Ruby) are installed using the Extras Library. To see the latest available version:

$ amazon-linux-extras list

您需要具有sudo权限才能安装:

You'll need sudo privileges to install:

$ sudo amazon-linux-extras install ruby2.6

这篇关于如何在Amazon Linux系统中升级ruby版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆