RUBY 2.7 UPDATE

I need to have Ruby 2.7 or above on my Leap 15.3 to build an open source Ruby / Java application. It keeps erroring out with Ruby 2.7.0 required Ruby 2.5.0 installed. I have downloaded the source code for Ruby 2.7.0, configured it, made it, compiled it then ran the following command to attempt to pass the path to my terminal sudo echo ‘export PATH=“usr/lib64/ruby/ruby-2.7.0/bin:$PATH”’ >> ~/.kshrc also have ran this command with .zshrc and .bashrc to cover the K Z and BASH terminals. However, I am installing the app using sudo which makes me su at the time so does my USER path still include the path that i added ?? Where is the bin folder for the “gem install” command so that I can manually tell it when I invoke sudo for example sudo /usr/lib64/ruby/ruby-2.7.0/bin/gem install bundle so that ruby version 2.7.0 is installing NOT THE SYSTEM 2.5.0 .

sudo echo 'export PATH="usr/lib64/ruby/ruby-2.7.0/bin:$PATH"' >> ~/.kshrc 

To me this looks as very tricky. Can you explain what you are trying to do. And I assume this will throw an error, or ask for more or something because there is an opening ', but no corresponding closing '.

Also. who’s home directory do you think ~ is representing?

Sorry, I now see the closing '. :shame:

But when you as user CampGrace want to add the line

export PATH="usr/lib64/ruby/ruby-2.7.0/bin:$PATH"

at the end of /home/CampGrace/.kshrc, why do you do this as superuser???