chruby icon indicating copy to clipboard operation
chruby copied to clipboard

How to set all ruby to new installed one whatever the root user or sudo command?

Open run27017 opened this issue 9 years ago • 1 comments

I am using openSuse Leap 42.1 and ruby 2.1 is installed as default. Now I want to replace it by ruby 2.3 through chruby. The new ruby is installed in directory /opt/rubies/ruby2.3, and following the tutorial I successfully set the ruby as default ruby of my own user. However, there are still two issues:

  1. The ruby version of root user is not changed. (which ruby is not 'opt/rubies/ruby2.3/bin/ruby')
  2. The ruby version is not changed when I type sudo command.

I have tried some methods searched through Google and actually they all do not work any more.

On the other hand, I also want to change the gem and bundle and rake to the new installed ruby 2.3 related.

I am looking forward to the replay. Thank you!

run27017 avatar Mar 28 '16 14:03 run27017

Hi,

ad 1. Make sure to enable chruby for the root user (see README) or system-wide for all users. ad 2. Please read the wiki page for usage with sudo.

Hope this helps.

jayeff avatar Mar 30 '16 09:03 jayeff