How can I install ruby ​​on Redhat? ruby package not found

I don’t know why I can’t install ruby ​​through yum in my RHEL6.2. How can I fix it. I do not want to install through the source. Any idea?

[ root@kithost ~]# yum install ruby Loaded plugins: product-id, refresh-packagekit, security, subscription-manager Updating certificate-based repositories. Setting up Install Process No package ruby available. Error: Nothing to do 

RVM is a solution, but it is not what I want.

What I want to know is that as soon as we can’t find any package from yum, what should we fix for yum to find it?

+4
source share
3 answers

Redhat does not have a free repo list unless you pay or subscribe to them.

The reason that I cannot install ruby ​​is because there is no list of available repos

Check

/etc/repo.list

You can copy the file from CentOS to Redhat.

Then your yum could search for an accessible repo server and make your ruby ​​downloadable.

+3
source

Probably the best way to install and manage Ruby is with RVM . In addition, you can use several ruby ​​versions using RVM. I bet it's really something you might like. Yum is once a curse :-).

Follow their installation guide as there are various installation methods (with pluses and minuses) and choosing the preferred one. I'm sure you will like it too.

However, if you are still thinking of using it, you can follow this guide . Remember, I do not know if this works or not, as I have not tried. Why should I try something else when I already use BEST :)!

+4
source

RVM is a good solution, but I found that rbenv was much better, including when you need to use Ruby on the server.

You can find how to install rbenv in README .

0
source

Source: https://habr.com/ru/post/1443619/


All Articles