The OpenShift forums have been retired.
You can still read and search them, but for help, please visit

rhc-create-domain: command not found

Hi, I'm new to OpenShift.

rhc-create-domain is apparently failing or not installed.


mark@marks-ThinkPad-T510:~$ su -c 'gem install rhc'
Building native extensions.  This could take a while...
Successfully installed json-1.5.3
Successfully installed parseconfig-0.5.2
Successfully installed rhc-0.73.14
3 gems installed
Installing ri documentation for json-1.5.3...
Installing ri documentation for parseconfig-0.5.2...
Installing ri documentation for rhc-0.73.14...
Installing RDoc documentation for json-1.5.3...
Installing RDoc documentation for parseconfig-0.5.2...
Installing RDoc documentation for rhc-0.73.14...

# so it would appear to be properly installed. I'm running Ubuntu 11.04-64 bit.
mark@marks-ThinkPad-T510:~$ rhc-create-domain -n wissler -l
rhc-create-domain: command not found

My address is good.

Any advice on how to correct this?




Hey Mark, with the gem installations, the gemfiles marked as binary don't always get placed in an executable path. It's usually pretty easy to solve if this is the problem - you'll just need to add the bin directory to your path. For example, on my system (Fedora), the gem is installed in:


In that directory, there is a /bin directory:


Simply add that directory to your path and you should be able to run rhc-create-domain and all the other commands:

export PATH=/usr/lib/ruby/gems/1.8/gems/rhc-0.73.14/bin:$PATH

(You probably want to put that line in your .bashrc or equivalent file as well so it's loaded on each login)

Let me know if this works.


I use Ubuntu 11.04 too and had this same "issue". I wasn't able to figure out where the rhc gems got installed. Googling showed up this thread on which explains how to find installed gems. So I ran

gem environment

RubyGems Environment:
- RUBY VERSION: 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]
- INSTALLATION DIRECTORY: /var/lib/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
- ruby
- x86-linux
- /var/lib/gems/1.8
- /home/me/.gem/ruby/1.8
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000

That led me to /var/lib/gems/1.8/gems/rhc-0.74.5/bin/ which had the rhc-* commands.

saved me a stack of Ubuntu trouble thanks.

I put the path in my bash_alias file like this
vim ~/.bash_aliases

export PATH

don't forget to restart bash

It fixed the "issue" but i then had trouble with file includes not found when i ran
rhc setup

no such file to load -- rhc/coverage_helper (LoadError)
no such file to load -- rhc-common (LoadError)

the solution for me was to cd to the lib folder and run the commands from there
cd /var/lib/gems/1.8/gems/rhc-0.97.17/lib
rhc setup

alternatively i believe you can do it using a symbolic link but i don't know how to
or you can dirty hack the file in
and put the full path in the require statement

Following the installation guide, I used "gem install rhc" command but got rhc 0.80 installed. There is no rhc in the bin directory. To fix the issue, I manually installed rhc 1.2.7 (downloaded from using command "gem install rhc-1.2.7.gem" and it works.

@hienchu: Interesting, I just tried installing RHC gem package on a clean machine and it did bring down latest and great version. See output below:

dhcp-16-206:.ssh sumana$ sudo gem install rhc
If this is your first time installing the RHC tools, please run 'rhc setup'
Successfully installed rhc-1.2.7
1 gem installed
Installing ri documentation for rhc-1.2.7...
Installing RDoc documentation for rhc-1.2.7...

I am interested in knowing OS information of the machine on which you performed the install.