Ruby installation issue in centos

I have installed ruby in centos 7. Then i try to ran the tmuxinator it gives me below error. How to solve this issue?

/opt/rh/rh-ruby23/root/usr/bin/ruby: error while loading shared libraries: libruby.so.2.3: cannot open shared object file: No such file or directory

output for ruby -v is ruby 2.2.8p477 (2017-09-14 revision 59906) [x86_64-linux]

output for rpm -q ruby is ruby-2.0.0.648-30.el7.x86_64

I try to remove old dependencies using rpm -e ruby , but it gives me below error. error: Failed dependencies: /usr/bin/ruby is needed by (installed) rubygems-2.0.14.1-30.el7.noarch /usr/bin/ruby is needed by (installed) ruby-irb-2.0.0.648-30.el7.noarch /usr/bin/ruby is needed by (installed) rubygem-rdoc-4.0.0-30.el7.noarch

It may be that your LIBRARY_PATH variable is not set up correctly while in tmuxinator. It seems that you have installed it into a non-default directory, so the shared libraries needs to be on the library path as well.

I would recommend using a Ruby version manager RVM. It sets all of the environment variables to use the right ruby for you. You just need to run the shell with the login flag for it to work.