There is official install guide available at OpenShift, however if you are in mainland China and do follow that, you will find it will never work. Why? Because we have the Great Firewall. Do not get angry or desperation, There is always a way to fix it.
Installing the Client Tools on Windows
You should not have any problem of installing the client tools (rhc) on Windows by following steps below:
- Step 1: Install Ruby with RubyInstaller
- Step 2: Install Git version control
- Step 3: Install the rhc Ruby gem
Setting up Your Machine
After installation is complete, open the Command Prompt and run:
C:\>gem install rhc
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ECONNRESET: An existing connection was forcibly closed by the remote host. - SSL_connect (https://api.rubygems.org/quick/......)
Alright, here comes the problem. Accessing the website https://rubygems.org is intermittently from Mainland China. You may think that VPN could solve this problem, in fact there is a simple way. Thanks to Taobao to offer a mirror site of rubygems.org, we can replace the default server by run following commands:
C:\>gem source -r https://rubygems.org
C:\>gem source -r http://ruby.taobao.org
Now run the command gem install rhc again, it should work.
Set it up properly
When you run the command rhc setup, you might be given error message like this:
cannot load such file — dl/import (LoadError)
Installing net-ssh as follow will fix the error.
gem install net-ssh -v 2.9.3.beta1
The official setup guide for your reference. https://developers.openshift.com/en/getting-started-windows.html