Home > Enterprise >  Yum Cannot See Ruby Installed
Yum Cannot See Ruby Installed

Time:04-15

I'm trying to install a package from an RPM file on Centos 7, with a dependency for Ruby (>= 2.6).

We have Ruby installed (2.6.6) via RVM (The latest version we can get via YUM is 2.0).

It seems YUM is unable to tell that we have Ruby installed and won't install the package we want:

Error: Package: shopify-cli-2.15.6-1.noarch (/shopify-cli-2.15.6-1.noarch)
           Requires: ruby >= 2.6.0
           Available: ruby-2.0.0.648-36.el7.x86_64 (base)
               ruby = 2.0.0.648-36.el7
           Available: ruby-2.0.0.648-39.el7_9.x86_64 (updates)
               ruby = 2.0.0.648-39.el7_9

RVM List shows:

$ rvm list
=* ruby-2.6.6 [ x86_64 ]
   ruby-3.0.0 [ x86_64 ]

And the ruby version:

$ ruby -v
ruby 2.6.7p197 (2021-04-05 revision 67941) [x86_64-linux]

I'm a bit stuck how to get past this point - is there a way for YUM to know we have Ruby installed and let us progress?

CodePudding user response:

In this situation you would want to install the shopify-cli as a gem from within your RVM:

rvm 2.6.6
gem install shopify-cli

Then you can execute it from within your RVM. An alternative would be to use a shopify-cli container image.

  • Related