I've borked something up somehow. On one of my servers, if I type ruby, I get the error bash: /opt/rh/rh-ruby23/root/usr/bin/ruby: No such file or directory

which ruby gives:


which -a ruby gives:


I had installed a version of ruby at /opt/rh/rh-ruby23 via yum install rh-ruby23 but I then removed with yum remove rh-ruby-23

I'm at a loss as to what's still pointing at /opt/rh/rh-ruby23/root/usr/bin/ruby

  • are either of those you found symlinks? readlink -f /usr/local/bin/ruby – mjb2kmn Nov 9 '17 at 18:20
  • /usr/bin/ruby is a symlink to /usr/local/bin/ruby – jemminger Nov 9 '17 at 19:10

Hmm, I think I had su - to root twice...after exiting I saw that I was still logged in as root. Tried ruby again, it worked as expected and was pointing to the correct version.

I'm not sure why, but that must have been the cause?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.