Can't use rhc after installation , for openshift

妖精的绣舞 提交于 2019-12-05 05:03:37

A similar issue has been addressed here. Hope that helps.

I'm using rbenv, and got the same problem

use gem list to check whether it's installed, if so, maybe you just need find it and add it to your PATH.

like I do this

ln -s /home/fengyl/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rhc-1.4.8/bin/rhc /home/fengyl/.rbenv/shims/

Try not installing it with sudo.

gem install rhc

worked for me,

sudo gem install rhc

did not. The docs ask you to do the former.

This happens to me right now, none of the current answers solve it.

Here's how I fixed the problem (add ruby gems to your path):

PATH="`ruby -e 'puts Gem.user_dir'`/bin:$PATH"

I am one of the OpenShift developers working on the client tools and using RVM to test my versions locally with no issues.

If you are using RVM, your $PATH should include something like this (I am using 1.9.3 with a gemset for my client-tools).

$ echo $PATH | tr : \\n 
/home/fotios/.rvm/gems/ruby-1.9.3-p125@client-tools/bin
/home/fotios/.rvm/gems/ruby-1.9.3-p125@global/bin
/home/fotios/.rvm/rubies/ruby-1.9.3-p125/bin
/home/fotios/.rvm/bin
...

$ which rhc
~/.rvm/gems/ruby-1.9.3-p125@client-tools/bin/rhc

If not, there may be a problem with your .bashrc/.profile. Check out the RVM installation notes or run rvm notes to ensure everything is working properly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!